From d3520419d49f4c283b96de23fa12ac68b3f2db60 Mon Sep 17 00:00:00 2001 From: Andreas Date: Fri, 23 Sep 2022 04:30:28 +0200 Subject: [PATCH] Clear search query before popping controller when navigating up (#8055) --- .../ui/browse/source/browse/BrowseSourceController.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt index 653371925..c9f0acc08 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt @@ -52,7 +52,13 @@ open class BrowseSourceController(bundle: Bundle) : BrowseSourceScreen( presenter = presenter, - navigateUp = { router.popCurrentController() }, + navigateUp = { + if (presenter.isUserQuery) { + presenter.search() + } else { + router.popCurrentController() + } + }, onFabClick = { filterSheet?.show() }, onMangaClick = { router.pushController(MangaController(it.id, true)) }, onMangaLongClick = { manga ->