[Android] Fix loading feedback from medialibrary

Geoffrey Métais git at videolan.org
Wed Jul 24 15:23:49 CEST 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Jul 24 15:23:15 2019 +0200| [7cc697d80911df11b9740c06a9e4b39cbbb8eff8] | committer: Geoffrey Métais

Fix loading feedback from medialibrary

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

 .../src/org/videolan/vlc/providers/medialibrary/MedialibraryProvider.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/providers/medialibrary/MedialibraryProvider.kt b/vlc-android/src/org/videolan/vlc/providers/medialibrary/MedialibraryProvider.kt
index 82f152cd1..13d952c69 100644
--- a/vlc-android/src/org/videolan/vlc/providers/medialibrary/MedialibraryProvider.kt
+++ b/vlc-android/src/org/videolan/vlc/providers/medialibrary/MedialibraryProvider.kt
@@ -42,7 +42,7 @@ abstract class MedialibraryProvider<T : MediaLibraryItem>(val context: Context,
     protected val medialibrary = AbstractMedialibrary.getInstance()
     private lateinit var dataSource : DataSource<Int, T>
     val loading = MutableLiveData<Boolean>().apply { value = true }
-    var isRefreshing by Delegates.observable(false) { _,_, value -> loading.postValue(value) }
+    var isRefreshing by Delegates.observable(false) { _,_, value -> loading.postValue(value || medialibrary.isWorking) }
         private set
 
     protected open val sortKey : String = this.javaClass.simpleName



More information about the Android mailing list