Moves the recomposition due to background color change to each compose node.

This commit is contained in:
Vitor Pamplona
2023-06-09 16:35:56 -04:00
parent 1efc4c91e2
commit bf6bc5ba68
15 changed files with 343 additions and 256 deletions
@@ -14,6 +14,7 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Check
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.MutableState
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.livedata.observeAsState
@@ -45,7 +46,7 @@ fun TranslatableRichTextViewer(
canPreview: Boolean,
modifier: Modifier = Modifier,
tags: ImmutableListOfLists<String>,
backgroundColor: Color,
backgroundColor: MutableState<Color>,
accountViewModel: AccountViewModel,
nav: (String) -> Unit
) {