[Android] Fix Medialibrary folder uncheck in settings

Geoffrey Métais git at videolan.org
Fri Aug 4 11:58:27 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Aug  4 11:56:40 2017 +0200| [1c4d7c68ba3f7236a95bf57da0e1a693c44b6542] | committer: Geoffrey Métais

Fix Medialibrary folder uncheck in settings

> https://code.videolan.org/videolan/vlc-android/commit/1c4d7c68ba3f7236a95bf57da0e1a693c44b6542
---

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserFragment.java
index 6f025644c..c2b3346d2 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserFragment.java
@@ -214,16 +214,16 @@ public class StorageBrowserFragment extends FileBrowserFragment implements Entry
         if (entryPoint.endsWith("/"))
             entryPoint = entryPoint.substring(0, entryPoint.length()-1);
         if (mProcessingFolders.containsKey(entryPoint)) {
-            final String finalMrl = entryPoint;
+            final CheckBox cb = mProcessingFolders.remove(entryPoint);
             mHandler.post(new Runnable() {
                 @Override
                 public void run() {
-                    mProcessingFolders.get(finalMrl).setEnabled(true);
+                    cb.setEnabled(true);
                     if (success) {
                         ((StorageBrowserAdapter)mAdapter).updateMediaDirs();
                         mAdapter.notifyDataSetChanged();
                     } else
-                        mProcessingFolders.get(finalMrl).setChecked(false);
+                        cb.setChecked(true);
                 }
             });
         }



More information about the Android mailing list