[Android] Fix refresh on networks

Geoffrey Métais git at videolan.org
Thu Apr 26 17:07:16 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Apr 26 17:06:55 2018 +0200| [4188a6bbc344c0b712dcf001c2150a339e78ef97] | committer: Geoffrey Métais

Fix refresh on networks

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

 .../src/org/videolan/vlc/viewmodels/browser/NetworkProvider.kt       | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/viewmodels/browser/NetworkProvider.kt b/vlc-android/src/org/videolan/vlc/viewmodels/browser/NetworkProvider.kt
index c59a001a8..1cf6be01e 100644
--- a/vlc-android/src/org/videolan/vlc/viewmodels/browser/NetworkProvider.kt
+++ b/vlc-android/src/org/videolan/vlc/viewmodels/browser/NetworkProvider.kt
@@ -42,7 +42,10 @@ class NetworkProvider(url: String? = null, showHiddenFiles: Boolean): BrowserPro
     override fun fetch() {}
 
     override fun refresh(): Boolean {
-        super.fetch()
+        if (url == null) {
+            dataset.value = mutableListOf()
+            browseRoot()
+        } else super.refresh()
         return true
     }
 



More information about the Android mailing list