Commit 123b2ac9 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Update lib when adding/removing a folder

parent a342f479
......@@ -201,6 +201,7 @@ public class BaseBrowserAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
} else
mDbManager.removeDir(path);
}
fragment.updateLib();
}
});
if (hasContextMenu) {
......
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment