From 9768b5ae2587d848b5f63b3c0a5c819255bcd53d Mon Sep 17 00:00:00 2001 From: Jay Date: Tue, 18 Feb 2020 22:56:31 -0800 Subject: [PATCH] Fixed spinner not disappearing if switching tabs and searching --- .../java/eu/kanade/tachiyomi/ui/library/LibraryController.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt index 63f28b5c4f..167d424115 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt @@ -273,8 +273,8 @@ class LibraryController( recycler.addOnScrollListener(scrollListener) spinner = ReSpinner(view.context) - (activity as MainActivity).supportActionBar?.setDisplayShowCustomEnabled(true) (activity as MainActivity).supportActionBar?.customView = spinner + (activity as MainActivity).supportActionBar?.setDisplayShowCustomEnabled(true) spinnerAdapter = SpinnerAdapter(view.context, R.layout.library_spinner_textview, arrayOf(resources!!.getString(R.string.label_library))) spinnerAdapter?.setDropDownViewResource(R.layout.library_spinner_entry_text) @@ -345,6 +345,8 @@ class LibraryController( LibraryUpdateService.setListener(this) } else if (type == ControllerChangeType.PUSH_EXIT) { + (activity as MainActivity).toolbar.menu.findItem(R.id + .action_search)?.collapseActionView() (activity as MainActivity).supportActionBar?.setDisplayShowCustomEnabled(false) } }