mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
hide hidden folders if set so
This commit is contained in:
parent
cae1c040ec
commit
60494b0cfd
2 changed files with 7 additions and 3 deletions
|
@ -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) {
|
||||||
removeHiddenFolders(dirs);
|
if (!mConfig.getShowHiddenFolders())
|
||||||
|
removeHiddenFolders(dirs);
|
||||||
|
|
||||||
removeNoMediaFolders(dirs);
|
removeNoMediaFolders(dirs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue