[Android] Fix empty loading view state on TV when the current folder is empty

Nicolas Pomepuy git at videolan.org
Mon Aug 2 05:50:04 UTC 2021


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Jul 27 09:15:26 2021 +0200| [03792134e70fefe2b5dfaab6a367c96be5187459] | committer: Nicolas Pomepuy

Fix empty loading view state on TV when the current folder is empty

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

 .../java/org/videolan/television/ui/browser/FileBrowserTvFragment.kt     | 1 +
 1 file changed, 1 insertion(+)

diff --git a/application/television/src/main/java/org/videolan/television/ui/browser/FileBrowserTvFragment.kt b/application/television/src/main/java/org/videolan/television/ui/browser/FileBrowserTvFragment.kt
index edebe7721..275e0ba94 100644
--- a/application/television/src/main/java/org/videolan/television/ui/browser/FileBrowserTvFragment.kt
+++ b/application/television/src/main/java/org/videolan/television/ui/browser/FileBrowserTvFragment.kt
@@ -122,6 +122,7 @@ class FileBrowserTvFragment : BaseBrowserTvFragment<MediaLibraryItem>(), PathAda
 
         (viewModel.provider as BrowserProvider).loading.observe(viewLifecycleOwner, {
             if (it) binding.emptyLoading.state = EmptyLoadingState.LOADING
+            if (!it && (viewModel as BrowserModel).dataset.isEmpty()) binding.emptyLoading.state = EmptyLoadingState.EMPTY
         })
 
         (viewModel as BrowserModel).getDescriptionUpdate().observe(viewLifecycleOwner, { pair ->



More information about the Android mailing list