Fix Global Search ignoring incognito mode when setting last used source. (#6374)

This commit is contained in:
Hunter Nickel 2021-12-24 07:32:19 -07:00 committed by GitHub
parent 7eed8c440c
commit d022bf2673
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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())
}
}