mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-03 05:10:14 +00:00
rename "text" to "content" in alert dialog
This commit is contained in:
parent
b7aadac07c
commit
875a98d3f4
23 changed files with 38 additions and 41 deletions
|
@ -136,7 +136,7 @@ fun MissingDictionaryDialog(onDismissRequest: () -> Unit, locale: Locale) {
|
||||||
cancelButtonText = stringResource(R.string.dialog_close),
|
cancelButtonText = stringResource(R.string.dialog_close),
|
||||||
onConfirmed = { prefs.edit { putBoolean(Settings.PREF_DONT_SHOW_MISSING_DICTIONARY_DIALOG, true) } },
|
onConfirmed = { prefs.edit { putBoolean(Settings.PREF_DONT_SHOW_MISSING_DICTIONARY_DIALOG, true) } },
|
||||||
confirmButtonText = stringResource(R.string.no_dictionary_dont_show_again_button),
|
confirmButtonText = stringResource(R.string.no_dictionary_dont_show_again_button),
|
||||||
text = { Text(annotatedString) }
|
content = { Text(annotatedString) }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ class SettingsActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferen
|
||||||
intent.setType("application/zip")
|
intent.setType("application/zip")
|
||||||
crashFilePicker.launch(intent)
|
crashFilePicker.launch(intent)
|
||||||
},
|
},
|
||||||
text = { Text("Crash report files found") },
|
content = { Text("Crash report files found") },
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ fun ColorPickerDialog(
|
||||||
onDismissRequest = onDismissRequest,
|
onDismissRequest = onDismissRequest,
|
||||||
onConfirmed = { onConfirmed(controller.selectedColor.value.toArgb()) },
|
onConfirmed = { onConfirmed(controller.selectedColor.value.toArgb()) },
|
||||||
title = { Text(title) },
|
title = { Text(title) },
|
||||||
text = {
|
content = {
|
||||||
Column {
|
Column {
|
||||||
Row {
|
Row {
|
||||||
Surface(
|
Surface(
|
||||||
|
|
|
@ -100,7 +100,7 @@ fun ColorThemePickerDialog(
|
||||||
neutralButtonText = stringResource(R.string.load),
|
neutralButtonText = stringResource(R.string.load),
|
||||||
onNeutral = { showLoadDialog = true },
|
onNeutral = { showLoadDialog = true },
|
||||||
title = { Text(setting.title) },
|
title = { Text(setting.title) },
|
||||||
text = {
|
content = {
|
||||||
CompositionLocalProvider(
|
CompositionLocalProvider(
|
||||||
LocalTextStyle provides MaterialTheme.typography.bodyLarge
|
LocalTextStyle provides MaterialTheme.typography.bodyLarge
|
||||||
) {
|
) {
|
||||||
|
@ -219,7 +219,7 @@ private fun ColorItemRow(onDismissRequest: () -> Unit, item: String, isSelected:
|
||||||
if (showDialog)
|
if (showDialog)
|
||||||
ConfirmationDialog(
|
ConfirmationDialog(
|
||||||
onDismissRequest = { showDialog = false },
|
onDismissRequest = { showDialog = false },
|
||||||
text = { Text(stringResource(R.string.delete_confirmation, item)) },
|
content = { Text(stringResource(R.string.delete_confirmation, item)) },
|
||||||
onConfirmed = {
|
onConfirmed = {
|
||||||
showDialog = false
|
showDialog = false
|
||||||
prefs.edit().remove(Settings.PREF_USER_COLORS_PREFIX + item)
|
prefs.edit().remove(Settings.PREF_USER_COLORS_PREFIX + item)
|
||||||
|
|
|
@ -17,7 +17,7 @@ fun ConfirmationDialog(
|
||||||
onConfirmed: () -> Unit,
|
onConfirmed: () -> Unit,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
title: @Composable (() -> Unit)? = null,
|
title: @Composable (() -> Unit)? = null,
|
||||||
text: @Composable (() -> Unit)? = null,
|
content: @Composable (() -> Unit)? = null,
|
||||||
confirmButtonText: String = stringResource(android.R.string.ok),
|
confirmButtonText: String = stringResource(android.R.string.ok),
|
||||||
cancelButtonText: String = stringResource(android.R.string.cancel),
|
cancelButtonText: String = stringResource(android.R.string.cancel),
|
||||||
neutralButtonText: String? = null,
|
neutralButtonText: String? = null,
|
||||||
|
@ -32,7 +32,7 @@ fun ConfirmationDialog(
|
||||||
onNeutral = onNeutral,
|
onNeutral = onNeutral,
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
title = title,
|
title = title,
|
||||||
text = text,
|
content = content,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,6 +44,6 @@ private fun PreviewConfirmDialog() {
|
||||||
onConfirmed = {},
|
onConfirmed = {},
|
||||||
neutralButtonText = "hi",
|
neutralButtonText = "hi",
|
||||||
confirmButtonText = "I don't care",
|
confirmButtonText = "I don't care",
|
||||||
text = { Text(stringResource(R.string.disable_personalized_dicts_message)) }
|
content = { Text(stringResource(R.string.disable_personalized_dicts_message)) }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@ fun CustomizeIconsDialog(
|
||||||
neutralButtonText = if (prefs.contains(prefKey)) stringResource(R.string.button_default) else null,
|
neutralButtonText = if (prefs.contains(prefKey)) stringResource(R.string.button_default) else null,
|
||||||
onNeutral = { showDeletePrefConfirmDialog = true },
|
onNeutral = { showDeletePrefConfirmDialog = true },
|
||||||
title = { Text(stringResource(R.string.customize_icons)) },
|
title = { Text(stringResource(R.string.customize_icons)) },
|
||||||
text = {
|
content = {
|
||||||
LazyColumn(state = state) {
|
LazyColumn(state = state) {
|
||||||
items(iconsAndNames, key = { it.second }) { (iconName, displayName) ->
|
items(iconsAndNames, key = { it.second }) { (iconName, displayName) ->
|
||||||
Row(
|
Row(
|
||||||
|
@ -132,7 +132,7 @@ fun CustomizeIconsDialog(
|
||||||
reloadItem(iconName)
|
reloadItem(iconName)
|
||||||
},
|
},
|
||||||
title = { Text(showIconDialog!!.second) },
|
title = { Text(showIconDialog!!.second) },
|
||||||
text = {
|
content = {
|
||||||
LazyVerticalGrid(
|
LazyVerticalGrid(
|
||||||
columns = GridCells.Adaptive(minSize = 64.dp),
|
columns = GridCells.Adaptive(minSize = 64.dp),
|
||||||
state = gridState
|
state = gridState
|
||||||
|
@ -170,7 +170,7 @@ fun CustomizeIconsDialog(
|
||||||
prefs.edit().remove(prefKey).apply()
|
prefs.edit().remove(prefKey).apply()
|
||||||
KeyboardIconsSet.instance.loadIcons(ctx)
|
KeyboardIconsSet.instance.loadIcons(ctx)
|
||||||
},
|
},
|
||||||
text = { Text(stringResource(R.string.customize_icons_reset_message)) }
|
content = { Text(stringResource(R.string.customize_icons_reset_message)) }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ fun DictionaryDialog(
|
||||||
confirmButtonText = null,
|
confirmButtonText = null,
|
||||||
cancelButtonText = stringResource(R.string.dialog_close),
|
cancelButtonText = stringResource(R.string.dialog_close),
|
||||||
title = { Text(locale.localizedDisplayName(ctx)) },
|
title = { Text(locale.localizedDisplayName(ctx)) },
|
||||||
text = {
|
content = {
|
||||||
val state = rememberScrollState()
|
val state = rememberScrollState()
|
||||||
Column(Modifier.verticalScroll(state)) {
|
Column(Modifier.verticalScroll(state)) {
|
||||||
if (hasInternal) {
|
if (hasInternal) {
|
||||||
|
@ -81,7 +81,7 @@ fun DictionaryDialog(
|
||||||
ConfirmationDialog(
|
ConfirmationDialog(
|
||||||
onDismissRequest = { showDeleteDialog = false },
|
onDismissRequest = { showDeleteDialog = false },
|
||||||
onConfirmed = { it.delete() },
|
onConfirmed = { it.delete() },
|
||||||
text = { Text(stringResource(R.string.remove_dictionary_message, type ?: ""))}
|
content = { Text(stringResource(R.string.remove_dictionary_message, type ?: ""))}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
val dictString = createDictionaryTextAnnotated(locale)
|
val dictString = createDictionaryTextAnnotated(locale)
|
||||||
|
|
|
@ -12,7 +12,7 @@ fun InfoDialog(
|
||||||
) {
|
) {
|
||||||
ThreeButtonAlertDialog(
|
ThreeButtonAlertDialog(
|
||||||
onDismissRequest = onDismissRequest,
|
onDismissRequest = onDismissRequest,
|
||||||
text = { Text(message) },
|
content = { Text(message) },
|
||||||
cancelButtonText = stringResource(android.R.string.ok),
|
cancelButtonText = stringResource(android.R.string.ok),
|
||||||
onConfirmed = { },
|
onConfirmed = { },
|
||||||
confirmButtonText = null
|
confirmButtonText = null
|
||||||
|
|
|
@ -86,7 +86,7 @@ fun LayoutPickerDialog(
|
||||||
neutralButtonText = stringResource(R.string.button_load_custom),
|
neutralButtonText = stringResource(R.string.button_load_custom),
|
||||||
onNeutral = { picker.launch(layoutIntent) },
|
onNeutral = { picker.launch(layoutIntent) },
|
||||||
title = { Text(setting.title) },
|
title = { Text(setting.title) },
|
||||||
text = {
|
content = {
|
||||||
CompositionLocalProvider(
|
CompositionLocalProvider(
|
||||||
LocalTextStyle provides MaterialTheme.typography.bodyLarge
|
LocalTextStyle provides MaterialTheme.typography.bodyLarge
|
||||||
) {
|
) {
|
||||||
|
@ -197,7 +197,7 @@ private fun LayoutItemRow(
|
||||||
ConfirmationDialog(
|
ConfirmationDialog(
|
||||||
onDismissRequest = { showDeleteDialog = false },
|
onDismissRequest = { showDeleteDialog = false },
|
||||||
title = { Text(stringResource(R.string.delete_layout, LayoutUtilsCustom.getDisplayName(layoutName))) },
|
title = { Text(stringResource(R.string.delete_layout, LayoutUtilsCustom.getDisplayName(layoutName))) },
|
||||||
text = { if (inUse) Text(stringResource(R.string.layout_in_use)) },
|
content = { if (inUse) Text(stringResource(R.string.layout_in_use)) },
|
||||||
confirmButtonText = stringResource(R.string.delete),
|
confirmButtonText = stringResource(R.string.delete),
|
||||||
onConfirmed = {
|
onConfirmed = {
|
||||||
showDeleteDialog = false
|
showDeleteDialog = false
|
||||||
|
|
|
@ -53,7 +53,7 @@ fun <T: Any> ListPickerDialog(
|
||||||
checkOk = { selected != null },
|
checkOk = { selected != null },
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
title = title,
|
title = title,
|
||||||
text = {
|
content = {
|
||||||
CompositionLocalProvider(
|
CompositionLocalProvider(
|
||||||
LocalTextStyle provides MaterialTheme.typography.bodyLarge
|
LocalTextStyle provides MaterialTheme.typography.bodyLarge
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -45,7 +45,7 @@ fun <T: Any> MultiListPickerDialog(
|
||||||
confirmButtonText = stringResource(android.R.string.ok),
|
confirmButtonText = stringResource(android.R.string.ok),
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
title = title,
|
title = title,
|
||||||
text = {
|
content = {
|
||||||
CompositionLocalProvider(
|
CompositionLocalProvider(
|
||||||
LocalTextStyle provides MaterialTheme.typography.bodyLarge
|
LocalTextStyle provides MaterialTheme.typography.bodyLarge
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -69,7 +69,7 @@ fun NewDictionaryDialog(
|
||||||
val newDictBroadcast = Intent(DictionaryPackConstants.NEW_DICTIONARY_INTENT_ACTION)
|
val newDictBroadcast = Intent(DictionaryPackConstants.NEW_DICTIONARY_INTENT_ACTION)
|
||||||
ctx.sendBroadcast(newDictBroadcast)
|
ctx.sendBroadcast(newDictBroadcast)
|
||||||
},
|
},
|
||||||
text = {
|
content = {
|
||||||
Column {
|
Column {
|
||||||
Text(info)
|
Text(info)
|
||||||
DropDownField(
|
DropDownField(
|
||||||
|
|
|
@ -56,7 +56,7 @@ fun <T: Any> ReorderDialog(
|
||||||
neutralButtonText = neutralButtonText,
|
neutralButtonText = neutralButtonText,
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
title = title,
|
title = title,
|
||||||
text = {
|
content = {
|
||||||
LazyColumn(
|
LazyColumn(
|
||||||
state = listState,
|
state = listState,
|
||||||
verticalArrangement = Arrangement.spacedBy(4.dp),
|
verticalArrangement = Arrangement.spacedBy(4.dp),
|
||||||
|
|
|
@ -40,7 +40,7 @@ fun SliderDialog(
|
||||||
onConfirmed = { onDone(sliderPosition) },
|
onConfirmed = { onDone(sliderPosition) },
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
title = title,
|
title = title,
|
||||||
text = {
|
content = {
|
||||||
CompositionLocalProvider(
|
CompositionLocalProvider(
|
||||||
LocalTextStyle provides MaterialTheme.typography.bodyLarge
|
LocalTextStyle provides MaterialTheme.typography.bodyLarge
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -106,7 +106,7 @@ fun SubtypeDialog(
|
||||||
SubtypeSettings.removeEnabledSubtype(ctx, subtype)
|
SubtypeSettings.removeEnabledSubtype(ctx, subtype)
|
||||||
},
|
},
|
||||||
title = { Text(SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(subtype)) },
|
title = { Text(SubtypeLocaleUtils.getSubtypeDisplayNameInSystemLocale(subtype)) },
|
||||||
text = {
|
content = {
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier.verticalScroll(scrollState),
|
modifier = Modifier.verticalScroll(scrollState),
|
||||||
verticalArrangement = Arrangement.spacedBy(8.dp),
|
verticalArrangement = Arrangement.spacedBy(8.dp),
|
||||||
|
@ -351,7 +351,7 @@ private fun MainLayoutRow(
|
||||||
onDismissRequest = { showLayoutDeleteDialog = false },
|
onDismissRequest = { showLayoutDeleteDialog = false },
|
||||||
confirmButtonText = stringResource(R.string.delete),
|
confirmButtonText = stringResource(R.string.delete),
|
||||||
title = { Text(stringResource(R.string.delete_layout, LayoutUtilsCustom.getDisplayName(it))) },
|
title = { Text(stringResource(R.string.delete_layout, LayoutUtilsCustom.getDisplayName(it))) },
|
||||||
text = { if (others) Text(stringResource(R.string.layout_in_use)) },
|
content = { if (others) Text(stringResource(R.string.layout_in_use)) },
|
||||||
onConfirmed = {
|
onConfirmed = {
|
||||||
if (it == currentSubtype.mainLayoutName())
|
if (it == currentSubtype.mainLayoutName())
|
||||||
setCurrentSubtype(currentSubtype.withoutLayout(LayoutType.MAIN))
|
setCurrentSubtype(currentSubtype.withoutLayout(LayoutType.MAIN))
|
||||||
|
@ -393,7 +393,7 @@ private fun MainLayoutRow(
|
||||||
ConfirmationDialog(
|
ConfirmationDialog(
|
||||||
onDismissRequest = { showAddLayoutDialog = false },
|
onDismissRequest = { showAddLayoutDialog = false },
|
||||||
title = { Text(stringResource(R.string.button_title_add_custom_layout)) },
|
title = { Text(stringResource(R.string.button_title_add_custom_layout)) },
|
||||||
text = { Text(annotated) },
|
content = { Text(annotated) },
|
||||||
onConfirmed = { showLayoutEditDialog = "new layout" to "" },
|
onConfirmed = { showLayoutEditDialog = "new layout" to "" },
|
||||||
neutralButtonText = stringResource(R.string.button_load_custom),
|
neutralButtonText = stringResource(R.string.button_load_custom),
|
||||||
onNeutral = {
|
onNeutral = {
|
||||||
|
|
|
@ -65,7 +65,7 @@ fun TextInputDialog(
|
||||||
onNeutral = { onDismissRequest(); onNeutral() },
|
onNeutral = { onDismissRequest(); onNeutral() },
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
title = title,
|
title = title,
|
||||||
text = {
|
content = {
|
||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
value = value,
|
value = value,
|
||||||
onValueChange = { value = it },
|
onValueChange = { value = it },
|
||||||
|
|
|
@ -34,7 +34,7 @@ fun ThreeButtonAlertDialog(
|
||||||
onConfirmed: () -> Unit,
|
onConfirmed: () -> Unit,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
title: @Composable (() -> Unit)? = null,
|
title: @Composable (() -> Unit)? = null,
|
||||||
text: @Composable (() -> Unit)? = null,
|
content: @Composable (() -> Unit)? = null,
|
||||||
onNeutral: () -> Unit = { },
|
onNeutral: () -> Unit = { },
|
||||||
checkOk: () -> Boolean = { true },
|
checkOk: () -> Boolean = { true },
|
||||||
confirmButtonText: String? = stringResource(android.R.string.ok),
|
confirmButtonText: String? = stringResource(android.R.string.ok),
|
||||||
|
@ -69,10 +69,10 @@ fun ThreeButtonAlertDialog(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text?.let {
|
content?.let {
|
||||||
CompositionLocalProvider(LocalTextStyle provides MaterialTheme.typography.bodyMedium) {
|
CompositionLocalProvider(LocalTextStyle provides MaterialTheme.typography.bodyMedium) {
|
||||||
Box(Modifier.weight(weight = 1f, fill = false).padding(bottom = if (reducePadding) 2.dp else 8.dp)) {
|
Box(Modifier.weight(weight = 1f, fill = false).padding(bottom = if (reducePadding) 2.dp else 8.dp)) {
|
||||||
text()
|
content()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ private fun Preview() {
|
||||||
ThreeButtonAlertDialog(
|
ThreeButtonAlertDialog(
|
||||||
onDismissRequest = {},
|
onDismissRequest = {},
|
||||||
onConfirmed = { },
|
onConfirmed = { },
|
||||||
text = { Text("hello") },
|
content = { Text("hello") },
|
||||||
title = { Text("title") },
|
title = { Text("title") },
|
||||||
neutralButtonText = "Default"
|
neutralButtonText = "Default"
|
||||||
)
|
)
|
||||||
|
|
|
@ -53,7 +53,7 @@ fun ToolbarKeysCustomizer(
|
||||||
neutralButtonText = if (readCustomKeyCodes(prefs).isNotEmpty()) stringResource(R.string.button_default) else null,
|
neutralButtonText = if (readCustomKeyCodes(prefs).isNotEmpty()) stringResource(R.string.button_default) else null,
|
||||||
onNeutral = { showDeletePrefConfirmDialog = true },
|
onNeutral = { showDeletePrefConfirmDialog = true },
|
||||||
title = { Text(stringResource(R.string.customize_toolbar_key_codes)) },
|
title = { Text(stringResource(R.string.customize_toolbar_key_codes)) },
|
||||||
text = {
|
content = {
|
||||||
LazyColumn(
|
LazyColumn(
|
||||||
verticalArrangement = Arrangement.spacedBy(4.dp)
|
verticalArrangement = Arrangement.spacedBy(4.dp)
|
||||||
) {
|
) {
|
||||||
|
@ -82,7 +82,7 @@ fun ToolbarKeysCustomizer(
|
||||||
onDismissRequest()
|
onDismissRequest()
|
||||||
prefs.edit().remove(key).apply()
|
prefs.edit().remove(key).apply()
|
||||||
},
|
},
|
||||||
text = { Text(stringResource(R.string.customize_toolbar_key_code_reset_message)) }
|
content = { Text(stringResource(R.string.customize_toolbar_key_code_reset_message)) }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ private fun ToolbarKeyCustomizer(
|
||||||
writeCustomKeyCodes(prefs, keys)
|
writeCustomKeyCodes(prefs, keys)
|
||||||
},
|
},
|
||||||
title = { Text(key.name.lowercase().getStringResourceOrName("", ctx)) },
|
title = { Text(key.name.lowercase().getStringResourceOrName("", ctx)) },
|
||||||
text = {
|
content = {
|
||||||
Column {
|
Column {
|
||||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||||
Text(stringResource(R.string.key_code), Modifier.weight(0.5f))
|
Text(stringResource(R.string.key_code), Modifier.weight(0.5f))
|
||||||
|
|
|
@ -181,7 +181,7 @@ fun BackupRestorePreference(setting: Setting) {
|
||||||
ConfirmationDialog(
|
ConfirmationDialog(
|
||||||
onDismissRequest = { showDialog = false },
|
onDismissRequest = { showDialog = false },
|
||||||
title = { Text(stringResource(R.string.backup_restore_title)) },
|
title = { Text(stringResource(R.string.backup_restore_title)) },
|
||||||
text = { Text(stringResource(R.string.backup_restore_message)) },
|
content = { Text(stringResource(R.string.backup_restore_message)) },
|
||||||
confirmButtonText = stringResource(R.string.button_backup),
|
confirmButtonText = stringResource(R.string.button_backup),
|
||||||
neutralButtonText = stringResource(R.string.button_restore),
|
neutralButtonText = stringResource(R.string.button_restore),
|
||||||
onNeutral = {
|
onNeutral = {
|
||||||
|
|
|
@ -85,7 +85,7 @@ fun LoadGestureLibPreference(setting: Setting) {
|
||||||
launcher.launch(intent)
|
launcher.launch(intent)
|
||||||
},
|
},
|
||||||
title = { Text(stringResource(R.string.load_gesture_library)) },
|
title = { Text(stringResource(R.string.load_gesture_library)) },
|
||||||
text = { Text(stringResource(R.string.load_gesture_library_message, abi)) },
|
content = { Text(stringResource(R.string.load_gesture_library_message, abi)) },
|
||||||
neutralButtonText = if (libFile.exists()) stringResource(R.string.load_gesture_library_button_delete) else null,
|
neutralButtonText = if (libFile.exists()) stringResource(R.string.load_gesture_library_button_delete) else null,
|
||||||
onNeutral = {
|
onNeutral = {
|
||||||
libFile.delete()
|
libFile.delete()
|
||||||
|
@ -100,7 +100,7 @@ fun LoadGestureLibPreference(setting: Setting) {
|
||||||
File(tempFilePath!!).delete()
|
File(tempFilePath!!).delete()
|
||||||
tempFilePath = null
|
tempFilePath = null
|
||||||
},
|
},
|
||||||
text = { Text(stringResource(R.string.checksum_mismatch_message, abi)) },
|
content = { Text(stringResource(R.string.checksum_mismatch_message, abi)) },
|
||||||
onConfirmed = {
|
onConfirmed = {
|
||||||
val tempFile = File(tempFilePath!!)
|
val tempFile = File(tempFilePath!!)
|
||||||
renameToLibFileAndRestart(tempFile, ChecksumCalculator.checksum(tempFile.inputStream()) ?: "")
|
renameToLibFileAndRestart(tempFile, ChecksumCalculator.checksum(tempFile.inputStream()) ?: "")
|
||||||
|
|
|
@ -97,7 +97,7 @@ fun DictionaryScreen(
|
||||||
dictPicker.launch(intent)
|
dictPicker.launch(intent)
|
||||||
},
|
},
|
||||||
title = { Text(stringResource(R.string.add_new_dictionary_title)) },
|
title = { Text(stringResource(R.string.add_new_dictionary_title)) },
|
||||||
text = {
|
content = {
|
||||||
// addDictString contains "%s" since we didn't supply a formatArg
|
// addDictString contains "%s" since we didn't supply a formatArg
|
||||||
val addDictString = stringResource(R.string.add_dictionary)
|
val addDictString = stringResource(R.string.add_dictionary)
|
||||||
val annotated = buildAnnotatedString {
|
val annotated = buildAnnotatedString {
|
||||||
|
|
|
@ -110,7 +110,7 @@ fun PersonalDictionaryScreen(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
text = {
|
content = {
|
||||||
Column(
|
Column(
|
||||||
verticalArrangement = Arrangement.spacedBy(8.dp)
|
verticalArrangement = Arrangement.spacedBy(8.dp)
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -25,11 +25,9 @@ import helium314.keyboard.latin.R
|
||||||
import helium314.keyboard.latin.permissions.PermissionsUtil
|
import helium314.keyboard.latin.permissions.PermissionsUtil
|
||||||
import helium314.keyboard.latin.settings.Defaults
|
import helium314.keyboard.latin.settings.Defaults
|
||||||
import helium314.keyboard.latin.settings.Settings
|
import helium314.keyboard.latin.settings.Settings
|
||||||
import helium314.keyboard.latin.settings.UserDictionaryListFragment
|
|
||||||
import helium314.keyboard.latin.utils.Log
|
import helium314.keyboard.latin.utils.Log
|
||||||
import helium314.keyboard.latin.utils.getActivity
|
import helium314.keyboard.latin.utils.getActivity
|
||||||
import helium314.keyboard.latin.utils.prefs
|
import helium314.keyboard.latin.utils.prefs
|
||||||
import helium314.keyboard.latin.utils.switchTo
|
|
||||||
import helium314.keyboard.settings.SettingsContainer
|
import helium314.keyboard.settings.SettingsContainer
|
||||||
import helium314.keyboard.settings.preferences.ListPreference
|
import helium314.keyboard.settings.preferences.ListPreference
|
||||||
import helium314.keyboard.settings.SettingsWithoutKey
|
import helium314.keyboard.settings.SettingsWithoutKey
|
||||||
|
@ -38,7 +36,6 @@ import helium314.keyboard.settings.preferences.Preference
|
||||||
import helium314.keyboard.settings.SearchSettingsScreen
|
import helium314.keyboard.settings.SearchSettingsScreen
|
||||||
import helium314.keyboard.settings.SettingsActivity
|
import helium314.keyboard.settings.SettingsActivity
|
||||||
import helium314.keyboard.settings.SettingsDestination
|
import helium314.keyboard.settings.SettingsDestination
|
||||||
import helium314.keyboard.settings.SettingsNavHost
|
|
||||||
import helium314.keyboard.settings.preferences.SwitchPreference
|
import helium314.keyboard.settings.preferences.SwitchPreference
|
||||||
import helium314.keyboard.settings.Theme
|
import helium314.keyboard.settings.Theme
|
||||||
import helium314.keyboard.settings.dialogs.ConfirmationDialog
|
import helium314.keyboard.settings.dialogs.ConfirmationDialog
|
||||||
|
@ -166,7 +163,7 @@ fun createCorrectionSettings(context: Context) = listOf(
|
||||||
onConfirmed = {
|
onConfirmed = {
|
||||||
prefs.edit().putBoolean(setting.key, false).apply()
|
prefs.edit().putBoolean(setting.key, false).apply()
|
||||||
},
|
},
|
||||||
text = { Text(stringResource(R.string.disable_personalized_dicts_message)) }
|
content = { Text(stringResource(R.string.disable_personalized_dicts_message)) }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue