Add a button to select all scanlators

Resolves #943
Closes #1109
This commit is contained in:
AntsyLich 2024-08-12 02:50:45 +06:00
parent 200d39e023
commit 84b2164787
No known key found for this signature in database

View File

@ -108,8 +108,14 @@ fun ScanlatorFilterDialog(
}
} else {
FlowRow {
TextButton(onClick = mutableExcludedScanlators::clear) {
Text(text = stringResource(MR.strings.action_reset))
if (mutableExcludedScanlators.isEmpty()) {
TextButton(onClick = { mutableExcludedScanlators.addAll(availableScanlators) }) {
Text(text = stringResource(MR.strings.action_select_all))
}
} else {
TextButton(onClick = mutableExcludedScanlators::clear) {
Text(text = stringResource(MR.strings.action_reset))
}
}
Spacer(modifier = Modifier.weight(1f))
TextButton(onClick = onDismissRequest) {