1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-04 06:20:26 +00:00

Allow multiple selection of read-only messages, with limitations

This commit is contained in:
M66B 2021-11-29 19:30:18 +01:00
parent ed08936b62
commit d56068c650
2 changed files with 36 additions and 31 deletions

View file

@ -3042,6 +3042,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
folder = db.folder().getFolder(message.folder);
if (folder == null)
continue;
if (folder.read_only)
result.read_only = true;
folders.put(folder.id, folder);
}
@ -3213,6 +3215,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
popupMenu.getMenu().add(Menu.NONE, R.string.title_raw_send, order++, R.string.title_raw_send)
.setIcon(R.drawable.twotone_attachment_24);
if (!result.read_only) {
if (result.hasInbox && !result.isInbox) // not is inbox
popupMenu.getMenu().add(Menu.FIRST, R.string.title_folder_inbox, order++, R.string.title_folder_inbox)
.setIcon(R.drawable.twotone_move_to_inbox_24);
@ -3250,6 +3253,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
if (result.copyto != null)
popupMenu.getMenu().add(Menu.FIRST, R.string.title_copy_to, order++, R.string.title_copy_to)
.setIcon(R.drawable.twotone_file_copy_24);
}
popupMenu.insertIcons(context);
@ -8824,6 +8828,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
boolean hasImap;
boolean hasPop;
Boolean leave_deleted;
boolean read_only;
List<Long> folders;
List<EntityAccount> accounts;
EntityAccount copyto;

View file

@ -49,7 +49,7 @@ public class SelectionPredicateMessage extends SelectionTracker.SelectionPredica
if (message.accountProtocol != EntityAccount.TYPE_IMAP)
return true;
if (message.uid != null && !message.folderReadOnly)
if (message.uid != null)
return true;
return false;