From c2c71d69f6d3e8a8a06d8c9fdb68fd7853439e44 Mon Sep 17 00:00:00 2001 From: Cuong-Tran Date: Sun, 27 Oct 2024 16:06:55 +0700 Subject: [PATCH] force recomposition everytimes actionModeCounter is changed --- .../eu/kanade/presentation/manga/components/MangaToolbar.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/src/main/java/eu/kanade/presentation/manga/components/MangaToolbar.kt b/app/src/main/java/eu/kanade/presentation/manga/components/MangaToolbar.kt index 9d812f98e4..6885bfce54 100644 --- a/app/src/main/java/eu/kanade/presentation/manga/components/MangaToolbar.kt +++ b/app/src/main/java/eu/kanade/presentation/manga/components/MangaToolbar.kt @@ -9,7 +9,6 @@ import androidx.compose.material3.LocalContentColor import androidx.compose.material3.MaterialTheme import androidx.compose.material3.surfaceColorAtElevation import androidx.compose.runtime.Composable -import androidx.compose.runtime.derivedStateOf import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember @@ -46,9 +45,7 @@ fun MangaToolbar( modifier: Modifier = Modifier, backgroundAlphaProvider: () -> Float, ) { - val isActionMode by remember(actionModeCounter) { - derivedStateOf { actionModeCounter > 0 } - } + val isActionMode = remember(actionModeCounter) { actionModeCounter > 0 } AppBar( modifier = modifier, title = title,