[Android] Update play/shuffle all icon when shuffle mode changes
Robert Stone
git at videolan.org
Fri May 20 06:03:58 UTC 2022
vlc-android | branch: master | Robert Stone <rhstone at gmail.com> | Thu May 19 22:30:21 2022 -0700| [fa864bfd5b86645bb665765be00e3b0b1ecdde49] | committer: Nicolas Pomepuy
Update play/shuffle all icon when shuffle mode changes
> https://code.videolan.org/videolan/vlc-android/commit/fa864bfd5b86645bb665765be00e3b0b1ecdde49
---
application/vlc-android/src/org/videolan/vlc/MediaBrowserCallback.kt | 4 ++++
application/vlc-android/src/org/videolan/vlc/PlaybackService.kt | 1 +
2 files changed, 5 insertions(+)
diff --git a/application/vlc-android/src/org/videolan/vlc/MediaBrowserCallback.kt b/application/vlc-android/src/org/videolan/vlc/MediaBrowserCallback.kt
index 9dfc21152..1199e74ad 100644
--- a/application/vlc-android/src/org/videolan/vlc/MediaBrowserCallback.kt
+++ b/application/vlc-android/src/org/videolan/vlc/MediaBrowserCallback.kt
@@ -132,6 +132,10 @@ class MediaBrowserCallback(private val playbackService: PlaybackService) : IMedi
refreshActor.trySend(Unit)
}
+ fun onShuffleChanged() {
+ refreshActor.trySend(Unit)
+ }
+
override fun removeCallbacks() {
if (::refreshActor.isInitialized) {
medialibrary.removeMediaCb(this)
diff --git a/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt b/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt
index a25ca2766..96ff8e69d 100644
--- a/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt
+++ b/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt
@@ -1182,6 +1182,7 @@ class PlaybackService : MediaBrowserServiceCompat(), LifecycleOwner, CoroutineSc
fun shuffle() {
playlistManager.shuffle()
publishState()
+ browserCallback.onShuffleChanged()
}
private fun updateWidget() {
More information about the Android
mailing list