Minor tweaks to download custom dialog
- Allow large decrements (just goes to 0) - Use Material3 text field for proper theming - Move dialog composable to presentation package
This commit is contained in:
@@ -35,7 +35,7 @@ fun ClearDatabaseContent(
|
||||
)
|
||||
}
|
||||
}
|
||||
false -> EmptyScreen(message = stringResource(id = R.string.database_clean))
|
||||
false -> EmptyScreen(message = stringResource(R.string.database_clean))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,16 +16,16 @@ fun ClearDatabaseDeleteDialog(
|
||||
onDismissRequest = onDismissRequest,
|
||||
confirmButton = {
|
||||
TextButton(onClick = onDelete) {
|
||||
Text(text = stringResource(id = android.R.string.ok))
|
||||
Text(text = stringResource(android.R.string.ok))
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
TextButton(onClick = onDismissRequest) {
|
||||
Text(text = stringResource(id = android.R.string.cancel))
|
||||
Text(text = stringResource(android.R.string.cancel))
|
||||
}
|
||||
},
|
||||
text = {
|
||||
Text(text = stringResource(id = R.string.clear_database_confirmation))
|
||||
Text(text = stringResource(R.string.clear_database_confirmation))
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ fun ClearDatabaseFloatingActionButton(
|
||||
ExtendedFloatingActionButton(
|
||||
modifier = Modifier.navigationBarsPadding(),
|
||||
text = {
|
||||
Text(text = stringResource(id = R.string.action_delete))
|
||||
Text(text = stringResource(R.string.action_delete))
|
||||
},
|
||||
icon = {
|
||||
Icon(Icons.Outlined.Delete, contentDescription = "")
|
||||
|
||||
@@ -43,7 +43,7 @@ fun ClearDatabaseItem(
|
||||
text = source.visualName,
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
)
|
||||
Text(text = stringResource(id = R.string.clear_database_source_item_count, count))
|
||||
Text(text = stringResource(R.string.clear_database_source_item_count, count))
|
||||
}
|
||||
Checkbox(
|
||||
checked = isSelected,
|
||||
|
||||
@@ -18,19 +18,19 @@ fun ClearDatabaseToolbar(
|
||||
onClickInvertSelection: () -> Unit,
|
||||
) {
|
||||
AppBar(
|
||||
title = stringResource(id = R.string.pref_clear_database),
|
||||
title = stringResource(R.string.pref_clear_database),
|
||||
navigateUp = navigateUp,
|
||||
actions = {
|
||||
if (state.isEmpty.not()) {
|
||||
AppBarActions(
|
||||
actions = listOf(
|
||||
AppBar.Action(
|
||||
title = stringResource(id = R.string.action_select_all),
|
||||
title = stringResource(R.string.action_select_all),
|
||||
icon = Icons.Outlined.SelectAll,
|
||||
onClick = onClickSelectAll,
|
||||
),
|
||||
AppBar.Action(
|
||||
title = stringResource(id = R.string.action_select_all),
|
||||
title = stringResource(R.string.action_select_all),
|
||||
icon = Icons.Outlined.FlipToBack,
|
||||
onClick = onClickInvertSelection,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user