[Android] Watch media in PlaylistViewModel to allow the favorite state refresh
Nicolas Pomepuy
git at videolan.org
Tue Mar 14 11:59:20 UTC 2023
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Mar 9 13:43:59 2023 +0100| [a6a21bb5bc484c4bc44d400edabf0595b979b9d1] | committer: Nicolas Pomepuy
Watch media in PlaylistViewModel to allow the favorite state refresh
> https://code.videolan.org/videolan/vlc-android/commit/a6a21bb5bc484c4bc44d400edabf0595b979b9d1
---
.../src/org/videolan/vlc/viewmodels/mobile/PlaylistViewModel.kt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/viewmodels/mobile/PlaylistViewModel.kt b/application/vlc-android/src/org/videolan/vlc/viewmodels/mobile/PlaylistViewModel.kt
index f683f14895..4b32260d61 100644
--- a/application/vlc-android/src/org/videolan/vlc/viewmodels/mobile/PlaylistViewModel.kt
+++ b/application/vlc-android/src/org/videolan/vlc/viewmodels/mobile/PlaylistViewModel.kt
@@ -49,7 +49,10 @@ class PlaylistViewModel(context: Context, private val initialPlaylist: MediaLibr
init {
when (initialPlaylist) {
- is Playlist -> watchPlaylists()
+ is Playlist -> {
+ watchPlaylists()
+ watchMedia()
+ }
is Album -> {
watchAlbums()
watchMedia()
More information about the Android
mailing list