CreateBackupDialog: Select all options by default (#8215)
This commit is contained in:
parent
69cdba71eb
commit
e4292719d3
@ -22,12 +22,12 @@ import androidx.compose.runtime.Composable
|
|||||||
import androidx.compose.runtime.LaunchedEffect
|
import androidx.compose.runtime.LaunchedEffect
|
||||||
import androidx.compose.runtime.ReadOnlyComposable
|
import androidx.compose.runtime.ReadOnlyComposable
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.runtime.mutableStateListOf
|
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.runtime.rememberCoroutineScope
|
import androidx.compose.runtime.rememberCoroutineScope
|
||||||
import androidx.compose.runtime.saveable.rememberSaveable
|
import androidx.compose.runtime.saveable.rememberSaveable
|
||||||
import androidx.compose.runtime.setValue
|
import androidx.compose.runtime.setValue
|
||||||
|
import androidx.compose.runtime.toMutableStateList
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.platform.LocalClipboardManager
|
import androidx.compose.ui.platform.LocalClipboardManager
|
||||||
@ -135,19 +135,19 @@ class SettingsBackupScreen : SearchableSettings {
|
|||||||
onConfirm: (flag: Int) -> Unit,
|
onConfirm: (flag: Int) -> Unit,
|
||||||
onDismissRequest: () -> Unit,
|
onDismissRequest: () -> Unit,
|
||||||
) {
|
) {
|
||||||
val flags = remember { mutableStateListOf<Int>() }
|
val choices = remember {
|
||||||
|
mapOf(
|
||||||
|
BackupConst.BACKUP_CATEGORY to R.string.categories,
|
||||||
|
BackupConst.BACKUP_CHAPTER to R.string.chapters,
|
||||||
|
BackupConst.BACKUP_TRACK to R.string.track,
|
||||||
|
BackupConst.BACKUP_HISTORY to R.string.history,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
val flags = remember { choices.keys.toMutableStateList() }
|
||||||
AlertDialog(
|
AlertDialog(
|
||||||
onDismissRequest = onDismissRequest,
|
onDismissRequest = onDismissRequest,
|
||||||
title = { Text(text = stringResource(R.string.backup_choice)) },
|
title = { Text(text = stringResource(R.string.backup_choice)) },
|
||||||
text = {
|
text = {
|
||||||
val choices = remember {
|
|
||||||
mapOf(
|
|
||||||
BackupConst.BACKUP_CATEGORY to R.string.categories,
|
|
||||||
BackupConst.BACKUP_CHAPTER to R.string.chapters,
|
|
||||||
BackupConst.BACKUP_TRACK to R.string.track,
|
|
||||||
BackupConst.BACKUP_HISTORY to R.string.history,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
Column {
|
Column {
|
||||||
CreateBackupDialogItem(
|
CreateBackupDialogItem(
|
||||||
isSelected = true,
|
isSelected = true,
|
||||||
|
Loading…
Reference in New Issue
Block a user