From d022bf26733d629006e9b5fbfc9762667af359cb Mon Sep 17 00:00:00 2001 From: Hunter Nickel Date: Fri, 24 Dec 2021 07:32:19 -0700 Subject: [PATCH] Fix Global Search ignoring incognito mode when setting last used source. (#6374) --- .../ui/browse/source/globalsearch/GlobalSearchController.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchController.kt index ad5b1a729..3a3daef78 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchController.kt @@ -209,7 +209,9 @@ open class GlobalSearchController( * Opens a catalogue with the given search. */ override fun onTitleClick(source: CatalogueSource) { - presenter.preferences.lastUsedSource().set(source.id) + if (!preferences.incognitoMode().get()) { + preferences.lastUsedSource().set(source.id) + } router.pushController(BrowseSourceController(source, presenter.query).withFadeTransaction()) } }