hide hidden folders if set so

This commit is contained in:
tibbi 2016-10-09 14:59:16 +02:00
parent cae1c040ec
commit 60494b0cfd
2 changed files with 7 additions and 3 deletions

View file

@ -16,6 +16,7 @@ import android.support.design.widget.Snackbar;
import android.support.v4.app.ActivityCompat; import android.support.v4.app.ActivityCompat;
import android.support.v4.widget.SwipeRefreshLayout; import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AlertDialog; import android.support.v7.app.AlertDialog;
import android.util.Log;
import android.util.SparseBooleanArray; import android.util.SparseBooleanArray;
import android.view.ActionMode; import android.view.ActionMode;
import android.view.Menu; import android.view.Menu;
@ -229,7 +230,7 @@ public class MainActivity extends SimpleActivity
} }
final List<Directory> dirs = new ArrayList<>(directories.values()); final List<Directory> dirs = new ArrayList<>(directories.values());
filderDirectories(dirs); filterDirectories(dirs);
Directory.mSorting = mConfig.getDirectorySorting(); Directory.mSorting = mConfig.getDirectorySorting();
Collections.sort(dirs); Collections.sort(dirs);
@ -239,8 +240,10 @@ public class MainActivity extends SimpleActivity
return dirs; return dirs;
} }
private void filderDirectories(List<Directory> dirs) { private void filterDirectories(List<Directory> dirs) {
if (!mConfig.getShowHiddenFolders())
removeHiddenFolders(dirs); removeHiddenFolders(dirs);
removeNoMediaFolders(dirs); removeNoMediaFolders(dirs);
} }

View file

@ -166,6 +166,7 @@ public class MediaActivity extends SimpleActivity
private void hideDirectory() { private void hideDirectory() {
mConfig.addHiddenDirectory(mPath); mConfig.addHiddenDirectory(mPath);
finish();
} }
private void deleteDirectoryIfEmpty() { private void deleteDirectoryIfEmpty() {