Clear search query before popping controller when navigating up (#8055)

This commit is contained in:
Andreas 2022-09-23 04:30:28 +02:00 committed by GitHub
parent acb8ab15b2
commit d3520419d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 ->