Deletable folders

pull/194/merge
M66B 3 years ago
parent 000ac38524
commit 189255f8fe

@ -623,9 +623,8 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
if (Shortcuts.can(context))
popupMenu.getMenu().add(Menu.NONE, R.string.title_pin, order++, R.string.title_pin);
if (!folder.selectable && debug)
popupMenu.getMenu().add(Menu.NONE, R.string.title_delete, order++, R.string.title_delete)
.setEnabled(folder.inferiors);
if (!folder.read_only && EntityFolder.USER.equals(folder.type))
popupMenu.getMenu().add(Menu.NONE, R.string.title_delete, order++, R.string.title_delete);
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override

@ -353,7 +353,9 @@ public class FragmentFolder extends FragmentBase {
btnSave.setEnabled(true);
tvInboxRootHint.setVisibility(folder == null && parent == null ? View.VISIBLE : View.GONE);
deletable = (folder != null && EntityFolder.USER.equals(folder.type));
deletable = (folder != null &&
!folder.read_only &&
EntityFolder.USER.equals(folder.type));
invalidateOptionsMenu();
}

Loading…
Cancel
Save