[Android] TV: Update history on track change

Geoffrey Métais git at videolan.org
Thu Dec 6 15:45:14 CET 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Dec  6 15:44:52 2018 +0100| [61bbfcb6823fc285ef67f2c5707b2496dbebd8ca] | committer: Geoffrey Métais

TV: Update history on track change

> https://code.videolan.org/videolan/vlc-android/commit/61bbfcb6823fc285ef67f2c5707b2496dbebd8ca
---

 vlc-android/src/org/videolan/vlc/gui/tv/MainTvFragment.kt     | 4 ++++
 vlc-android/src/org/videolan/vlc/gui/tv/NowPlayingDelegate.kt | 1 +
 2 files changed, 5 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/MainTvFragment.kt b/vlc-android/src/org/videolan/vlc/gui/tv/MainTvFragment.kt
index 297e51440..a01a197bf 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/MainTvFragment.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/MainTvFragment.kt
@@ -277,6 +277,10 @@ class MainTvFragment : BrowseSupportFragment(), OnItemViewSelectedListener, OnIt
         }
     }
 
+    fun updateHistory() {
+        if (displayHistory) historyModel.refresh()
+    }
+
     override fun onChanged(list: MutableList<MediaWrapper>?) {
         list?.let {
             if (!it.isEmpty()) {
diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/NowPlayingDelegate.kt b/vlc-android/src/org/videolan/vlc/gui/tv/NowPlayingDelegate.kt
index 09b8104b8..bc0a78a90 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/NowPlayingDelegate.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/NowPlayingDelegate.kt
@@ -42,6 +42,7 @@ class NowPlayingDelegate(private val fragment: MainTvFragment): PlaybackService.
         fragment.updateAudioCategories(service?.currentMediaWrapper?.let {
             DummyItem(CATEGORY_NOW_PLAYING, it.title, it.artist).apply { setArtWork(service?.coverArt) }
         })
+        fragment.updateHistory()
     }
 
     override fun onConnected(service: PlaybackService) {



More information about the Android mailing list