Skip to content

Commit

Permalink
Add a button to select all scanlators
Browse files Browse the repository at this point in the history
Resolves #943
Closes #1109
  • Loading branch information
AntsyLich committed Aug 11, 2024
1 parent 200d39e commit 84b2164
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 84b2164

Please sign in to comment.