[Android] HeaderMediaListActivity: add CTX_ADD_SHORTCUT

Duncan McNamara git at videolan.org
Wed Jul 10 07:32:14 UTC 2024


vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Tue Jul  9 17:37:26 2024 +0200| [97e5fbad0d84880d7ebd57bf07530adfcfcecc95] | committer: Nicolas Pomepuy

HeaderMediaListActivity: add CTX_ADD_SHORTCUT

The ctx action was registered for this activity, but had no
implementation in the onCtxAction method

> https://code.videolan.org/videolan/vlc-android/commit/97e5fbad0d84880d7ebd57bf07530adfcfcecc95
---

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

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/HeaderMediaListActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/HeaderMediaListActivity.kt
index ba4c0fabb9..c056da4b2c 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/HeaderMediaListActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/HeaderMediaListActivity.kt
@@ -69,6 +69,7 @@ import org.videolan.vlc.gui.helpers.ExpandStateAppBarLayoutBehavior
 import org.videolan.vlc.gui.helpers.SwipeDragItemTouchHelperCallback
 import org.videolan.vlc.gui.helpers.UiTools
 import org.videolan.vlc.gui.helpers.UiTools.addToPlaylist
+import org.videolan.vlc.gui.helpers.UiTools.createShortcut
 import org.videolan.vlc.gui.helpers.UiTools.showPinIfNeeded
 import org.videolan.vlc.gui.view.RecyclerSectionItemDecoration
 import org.videolan.vlc.interfaces.Filterable
@@ -499,6 +500,7 @@ open class HeaderMediaListActivity : AudioPlayerContainerActivity(), IEventsHand
             CTX_FAV_ADD, CTX_FAV_REMOVE -> lifecycleScope.launch {
                 media.isFavorite = option == CTX_FAV_ADD
             }
+            CTX_ADD_SHORTCUT -> lifecycleScope.launch { createShortcut(media) }
             else -> {}
         }
 



More information about the Android mailing list