force recomposition everytimes actionModeCounter is changed

This commit is contained in:
Cuong-Tran 2024-10-27 16:06:55 +07:00
parent 9ad4ca9d77
commit 990760e72a
No known key found for this signature in database
GPG key ID: 733AA7624B9315C2

View file

@ -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,