[Android] BrowserProvider: Send event when folder is empty
Geoffrey Métais
git at videolan.org
Tue Aug 28 13:47:27 CEST 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Aug 28 13:43:42 2018 +0200| [b831c14d7d16ab46b7f2a6a93c4169b61d03f0e0] | committer: Geoffrey Métais
BrowserProvider: Send event when folder is empty
See #641
> https://code.videolan.org/videolan/vlc-android/commit/b831c14d7d16ab46b7f2a6a93c4169b61d03f0e0
---
vlc-android/src/org/videolan/vlc/providers/BrowserProvider.kt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/providers/BrowserProvider.kt b/vlc-android/src/org/videolan/vlc/providers/BrowserProvider.kt
index ae9b25899..16c26e124 100644
--- a/vlc-android/src/org/videolan/vlc/providers/BrowserProvider.kt
+++ b/vlc-android/src/org/videolan/vlc/providers/BrowserProvider.kt
@@ -89,7 +89,8 @@ abstract class BrowserProvider(val context: Context, val dataset: LiveDataset<Me
requestBrowsing(url)
job = launch(UI.immediate) {
for (media in browserChannel) addMedia(findMedia(media))
- parseSubDirectories()
+ if (dataset.value.isNotEmpty()) parseSubDirectories()
+ else dataset.clear() // send observable event when folder is empty
}
}
More information about the Android
mailing list