[Android] Update lib when adding/removing a folder
Geoffrey Métais
git at videolan.org
Tue May 12 14:40:51 CEST 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon May 11 15:17:25 2015 +0200| [123b2ac975ebccd1abc0fadf5f77f449c01b0d1d] | committer: Geoffrey Métais
Update lib when adding/removing a folder
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=123b2ac975ebccd1abc0fadf5f77f449c01b0d1d
---
vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java | 1 +
.../src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java | 2 +-
.../src/org/videolan/vlc/gui/browser/FileBrowserFragment.java | 2 ++
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
index fda65e5..194ddd0 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
@@ -201,6 +201,7 @@ public class BaseBrowserAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
} else
mDbManager.removeDir(path);
}
+ fragment.updateLib();
}
});
if (hasContextMenu) {
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
index 81d1100..715a581 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
@@ -441,7 +441,7 @@ public abstract class BaseBrowserFragment extends MediaBrowserFragment implement
return false;
}
- private void updateLib() {
+ protected void updateLib() {
FragmentManager fm = getFragmentManager();
FragmentTransaction ft = fm.beginTransaction();
Fragment fragment = fm.findFragmentByTag(SidebarAdapter.SidebarEntry.ID_AUDIO);
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/FileBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/FileBrowserFragment.java
index d5a228c..f664cae 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/FileBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/FileBrowserFragment.java
@@ -164,6 +164,7 @@ public class FileBrowserFragment extends BaseBrowserFragment {
CustomDirectories.addCustomDirectory(f.getAbsolutePath());
refresh();
+ updateLib();
}
});
mAlertDialog = builder.show();
@@ -188,6 +189,7 @@ public class FileBrowserFragment extends BaseBrowserFragment {
CustomDirectories.removeCustomDirectory(storage.getPath());
mAdapter.updateMediaDirs();
mAdapter.removeItem(position, true);
+ updateLib();
return true;
} else
return false;
More information about the Android
mailing list