Fix theme setting dialog not surviving configuration changes
This commit is contained in:
parent
628b331a0c
commit
5bb5a38981
1 changed files with 2 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ import androidx.compose.material.icons.Icons
|
|||
import androidx.compose.material.icons.filled.*
|
||||
import androidx.compose.material3.*
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.runtime.saveable.rememberSaveable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
|
|
@ -200,7 +201,7 @@ fun ThemeDialog(
|
|||
onDismissRequest: () -> Unit,
|
||||
onConfirm: (Theme) -> Unit
|
||||
) {
|
||||
var selectedTheme by remember { mutableStateOf(currentTheme) }
|
||||
var selectedTheme by rememberSaveable { mutableStateOf(currentTheme) }
|
||||
|
||||
AlertDialog(
|
||||
onDismissRequest = onDismissRequest,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue