[Android] TV: Fix startup

Geoffrey Métais git at videolan.org
Tue May 7 16:57:20 CEST 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue May  7 16:49:43 2019 +0200| [ce2dad438827bd1436042ccf835c2ba1a424feef] | committer: Geoffrey Métais

TV: Fix startup

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

 vlc-android/src/org/videolan/vlc/viewmodels/tv/MainTvModel.kt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/viewmodels/tv/MainTvModel.kt b/vlc-android/src/org/videolan/vlc/viewmodels/tv/MainTvModel.kt
index 496c23ba6..9d9863919 100644
--- a/vlc-android/src/org/videolan/vlc/viewmodels/tv/MainTvModel.kt
+++ b/vlc-android/src/org/videolan/vlc/viewmodels/tv/MainTvModel.kt
@@ -65,7 +65,6 @@ class MainTvModel(app: Application) : AndroidViewModel(app), Medialibrary.OnMedi
     private val showInternalStorage = AndroidDevices.showInternalStorage()
     private val browserFavRepository = BrowserFavRepository.getInstance(context)
     private var updatedFavoritList: List<MediaWrapper> = listOf()
-    private val nowPlayingDelegate = NowPlayingDelegate(this)
     private var showHistory = false
     // LiveData
     private val favorites: LiveData<List<BrowserFav>> = browserFavRepository.browserFavorites
@@ -74,6 +73,8 @@ class MainTvModel(app: Application) : AndroidViewModel(app), Medialibrary.OnMedi
     val browsers : LiveData<List<MediaLibraryItem>> = MutableLiveData()
     val history : LiveData<List<MediaWrapper>> = MutableLiveData()
 
+    private val nowPlayingDelegate = NowPlayingDelegate(this)
+
     private val favObserver = Observer<List<BrowserFav>> { list ->
         updatedFavoritList = convertFavorites(list)
         updateActor.offer(Unit)



More information about the Android mailing list