[Android] Fix history screen not searchable
Nicolas Pomepuy
git at videolan.org
Tue Aug 27 13:01:55 CEST 2019
vlc-android | branch: 3.2.x | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Fri Aug 23 13:28:19 2019 +0200| [a5e1c7751c2c8b5b1be244799fa923f273eb606f] | committer: Nicolas Pomepuy
Fix history screen not searchable
Fixes #947
(cherry picked from commit 5ad9172e7ec0ed05a55db33d4b1fb143d6630569)
> https://code.videolan.org/videolan/vlc-android/commit/a5e1c7751c2c8b5b1be244799fa923f273eb606f
---
vlc-android/src/org/videolan/vlc/gui/HistoryFragment.kt | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.kt b/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.kt
index ee5b8d111..ffeaa4176 100644
--- a/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.kt
@@ -69,7 +69,7 @@ class HistoryFragment : MediaBrowserFragment<HistoryModel>(), IRefreshable, IHis
historyAdapter.update(it)
updateEmptyView()
if (::cleanMenuItem.isInitialized) {
- cleanMenuItem.isVisible = !isEmpty()
+ cleanMenuItem.isVisible = list.isNotEmpty()
}
}
})
@@ -101,13 +101,8 @@ class HistoryFragment : MediaBrowserFragment<HistoryModel>(), IRefreshable, IHis
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
inflater.inflate(R.menu.fragment_option_history, menu)
super.onCreateOptionsMenu(menu, inflater)
- activity?.invalidateOptionsMenu()
- }
-
- override fun onPrepareOptionsMenu(menu: Menu) {
cleanMenuItem = menu.findItem(R.id.ml_menu_clean)
cleanMenuItem.isVisible = !isEmpty()
- super.onPrepareOptionsMenu(menu)
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {
More information about the Android
mailing list