Change expanded to saveable state

This commit is contained in:
Wolf-Martell Montwé 2023-11-08 11:34:49 +01:00
parent 1b77851478
commit 5bbf849509
No known key found for this signature in database
GPG key ID: 6D45B21512ACBF72

View file

@ -7,7 +7,7 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
@ -29,7 +29,7 @@ internal fun AutoDiscoveryResultView(
onEditConfigurationClick: () -> Unit,
modifier: Modifier = Modifier,
) {
val expanded = remember {
val expanded = rememberSaveable {
mutableStateOf(settings?.isTrusted?.not() ?: false)
}