From 1b25290d399037fe2d9744a899f86ca128699f8e Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 6 May 2023 12:27:44 -0400 Subject: [PATCH] Fix filter FAB not working in migrate screen I feel like this needs to be aligned with the browse screen/deduped somehow, but that can happen separately. Fixes #9444 --- .../browse/migration/search/SourceSearchScreen.kt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SourceSearchScreen.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SourceSearchScreen.kt index e512d90cf8..5c1ac86439 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SourceSearchScreen.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SourceSearchScreen.kt @@ -25,6 +25,7 @@ import eu.kanade.presentation.util.Screen import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.source.online.HttpSource import eu.kanade.tachiyomi.ui.browse.source.browse.BrowseSourceScreenModel +import eu.kanade.tachiyomi.ui.browse.source.browse.SourceFilterDialog import eu.kanade.tachiyomi.ui.home.HomeScreen import eu.kanade.tachiyomi.ui.manga.MangaScreen import eu.kanade.tachiyomi.ui.webview.WebViewScreen @@ -101,13 +102,23 @@ data class SourceSearchScreen( ) } + val onDismissRequest = { screenModel.setDialog(null) } when (val dialog = state.dialog) { + is BrowseSourceScreenModel.Dialog.Filter -> { + SourceFilterDialog( + onDismissRequest = onDismissRequest, + filters = state.filters, + onReset = screenModel::resetFilters, + onFilter = { screenModel.search(filters = state.filters) }, + onUpdate = screenModel::setFilters, + ) + } is BrowseSourceScreenModel.Dialog.Migrate -> { MigrateDialog( oldManga = oldManga, newManga = dialog.newManga, screenModel = rememberScreenModel { MigrateDialogScreenModel() }, - onDismissRequest = { screenModel.setDialog(null) }, + onDismissRequest = onDismissRequest, onClickTitle = { navigator.push(MangaScreen(dialog.newManga.id)) }, onPopScreen = { scope.launch {