[Android] Fix history fragment action mode state

Nicolas Pomepuy git at videolan.org
Fri Dec 4 11:33:54 CET 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Fri Dec  4 09:19:17 2020 +0100| [908d64069983740839e9a94dca7a257519b754d6] | committer: Jean-Baptiste Kempf

Fix history fragment action mode state

Fixes #1565

> https://code.videolan.org/videolan/vlc-android/commit/908d64069983740839e9a94dca7a257519b754d6
---

 application/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.kt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.kt
index b393d5c6e..ecdd0671e 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/HistoryFragment.kt
@@ -166,6 +166,7 @@ class HistoryFragment : MediaBrowserFragment<HistoryModel>(), IRefreshable, IHis
     }
 
     override fun onCreateActionMode(mode: ActionMode, menu: Menu): Boolean {
+        multiSelectHelper.toggleActionMode(true, historyAdapter.itemCount)
         mode.menuInflater.inflate(R.menu.action_mode_history, menu)
         return true
     }
@@ -202,6 +203,7 @@ class HistoryFragment : MediaBrowserFragment<HistoryModel>(), IRefreshable, IHis
     }
 
     override fun onDestroyActionMode(mode: ActionMode) {
+        multiSelectHelper.toggleActionMode(false, historyAdapter.itemCount)
         actionMode = null
         multiSelectHelper.clearSelection()
     }



More information about the Android mailing list