[Android] Improve Network browser empty view

Geoffrey Métais git at videolan.org
Wed Feb 21 16:03:15 CET 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Feb 21 15:13:21 2018 +0100| [3b4c939f13082256e0874e8acf9749d515dc4915] | committer: Geoffrey Métais

Improve Network browser empty view

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

 .../src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java   | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
index b13bd7ea2..8532dd1cf 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.java
@@ -80,8 +80,10 @@ public class NetworkBrowserFragment extends BaseBrowserFragment implements Exter
     public void refresh() {
         if (ExternalMonitor.isConnected())
             super.refresh();
-        else
+        else {
+            updateEmptyView();
             mAdapter.clear();
+        }
     }
 
     @Override
@@ -186,12 +188,12 @@ public class NetworkBrowserFragment extends BaseBrowserFragment implements Exter
     }
 
     private void updateFavorites() {
+        updateEmptyView();
         if (!ExternalMonitor.isConnected()) {
             if (mFavorites != 0) {
                 mAdapter.clear();
                 mFavorites = 0;
             }
-            updateEmptyView();
             return;
         }
 
@@ -239,7 +241,6 @@ public class NetworkBrowserFragment extends BaseBrowserFragment implements Exter
         mFavorites = newSize; //update count
         if (newSize != 0)
             mHandler.sendEmptyMessage(BrowserFragmentHandler.MSG_HIDE_LOADING);
-        updateEmptyView();
     }
 
     public void toggleFavorite() {



More information about the Android mailing list