From 84b2164787a795f3fd757c325cbfb6ef660ac3a3 Mon Sep 17 00:00:00 2001 From: AntsyLich <59261191+AntsyLich@users.noreply.github.com> Date: Mon, 12 Aug 2024 02:50:45 +0600 Subject: [PATCH] Add a button to select all scanlators Resolves #943 Closes #1109 --- .../manga/components/ScanlatorFilterDialog.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/presentation/manga/components/ScanlatorFilterDialog.kt b/app/src/main/java/eu/kanade/presentation/manga/components/ScanlatorFilterDialog.kt index 747ac09e0f..007dd8153e 100644 --- a/app/src/main/java/eu/kanade/presentation/manga/components/ScanlatorFilterDialog.kt +++ b/app/src/main/java/eu/kanade/presentation/manga/components/ScanlatorFilterDialog.kt @@ -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) {