Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2435 solved #2437

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -346,13 +346,13 @@ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
}

if ((item = menu.findItem(R.id.action_sort_by_name)) != null && GsFileUtils.SORT_BY_NAME.equals(_dopt.sortByType)) {
item.setChecked(true);
item.setChecked(false);
} else if ((item = menu.findItem(R.id.action_sort_by_date)) != null && GsFileUtils.SORT_BY_MTIME.equals(_dopt.sortByType)) {
item.setChecked(true);
} else if ((item = menu.findItem(R.id.action_sort_by_filesize)) != null && GsFileUtils.SORT_BY_FILESIZE.equals(_dopt.sortByType)) {
item.setChecked(true);
item.setChecked(false);
} else if ((item = menu.findItem(R.id.action_sort_by_mimetype)) != null && GsFileUtils.SORT_BY_MIMETYPE.equals(_dopt.sortByType)) {
item.setChecked(true);
item.setChecked(false);
}

List<Pair<File, String>> sdcardFolders = _cu.getAppDataPublicDirs(getContext(), false, true, true);
Expand Down Expand Up @@ -383,7 +383,7 @@ public boolean onOptionsItemSelected(final MenuItem item) {
return true;
}
case R.id.action_sort_by_name: {
item.setChecked(true);
item.setChecked(false);
_dopt.sortByType = _appSettings.setFileBrowserSortByType(GsFileUtils.SORT_BY_NAME);
reloadCurrentFolder();
return true;
Expand All @@ -408,12 +408,14 @@ public boolean onOptionsItemSelected(final MenuItem item) {
}
case R.id.action_sort_reverse: {
item.setChecked(!item.isChecked());
item.setChecked(false); // Uncheck other sort options
_dopt.sortReverse = _appSettings.setFileBrowserSortReverse(item.isChecked());
reloadCurrentFolder();
return true;
}
case R.id.action_show_dotfiles: {
item.setChecked(!item.isChecked());
item.setChecked(false);
_dopt.filterShowDotFiles = _appSettings.setFileBrowserFilterShowDotFiles(item.isChecked());
reloadCurrentFolder();
return true;
Expand Down