Use primitive state holders

This commit is contained in:
arkon
2023-05-27 09:22:31 -04:00
parent 0189fc1f66
commit dfd38db7e3
12 changed files with 29 additions and 22 deletions

View File

@@ -15,6 +15,7 @@ import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableIntStateOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
@@ -93,7 +94,7 @@ class SourcePreferencesScreen(val sourceId: Long) : Screen() {
commit: FragmentTransaction.(containerId: Int) -> Unit,
) {
val containerId by rememberSaveable {
mutableStateOf(View.generateViewId())
mutableIntStateOf(View.generateViewId())
}
var initialized by rememberSaveable { mutableStateOf(false) }
AndroidView(