Only enable search when mode is Catalogue

This commit is contained in:
Jobobby04 2021-04-04 18:54:07 -04:00
parent 7c4e89cbc5
commit acb9bafa0a

View File

@ -388,6 +388,7 @@ class SourceController(bundle: Bundle? = null) :
}
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
if (mode == Mode.CATALOGUE) {
createOptionsMenu(
menu,
inflater,
@ -397,10 +398,11 @@ class SourceController(bundle: Bundle? = null) :
false // GlobalSearch handles the searching here
)
}
}
override fun onSearchViewQueryTextSubmit(query: String?) {
// SY -->
if (mode != Mode.SMART_SEARCH) {
if (mode == Mode.CATALOGUE) {
parentController!!.router.pushController(
GlobalSearchController(query).withFadeTransaction()
)