[Android] Fix history screen not searchable
Nicolas Pomepuy
git at videolan.org
Fri Aug 23 13:42:02 CEST 2019
vlc-android | branch: master | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Fri Aug 23 13:28:19 2019 +0200| [5ad9172e7ec0ed05a55db33d4b1fb143d6630569] | committer: Nicolas Pomepuy
Fix history screen not searchable
Fixes #947
> https://code.videolan.org/videolan/vlc-android/commit/5ad9172e7ec0ed05a55db33d4b1fb143d6630569
---
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