mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
Simplification
This commit is contained in:
parent
94fba73dec
commit
5b250f194f
1 changed files with 4 additions and 12 deletions
|
@ -5919,30 +5919,22 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
if (!result[0] && !message.ui_seen)
|
||||
result[0] = true;
|
||||
|
||||
if (!result[1] &&
|
||||
(EntityFolder.ARCHIVE.equals(folder.type) ||
|
||||
EntityFolder.JUNK.equals(folder.type) ||
|
||||
EntityFolder.TRASH.equals(folder.type))) {
|
||||
if (!result[1] && !EntityFolder.INBOX.equals(folder.type)) {
|
||||
EntityFolder inbox = db.folder().getFolderByType(message.account, EntityFolder.INBOX);
|
||||
result[1] = (inbox != null && inbox.selectable);
|
||||
}
|
||||
|
||||
if (!result[2] &&
|
||||
!EntityFolder.ARCHIVE.equals(folder.type)) {
|
||||
if (!result[2] && !EntityFolder.ARCHIVE.equals(folder.type)) {
|
||||
EntityFolder archive = db.folder().getFolderByType(message.account, EntityFolder.ARCHIVE);
|
||||
result[2] = (archive != null && archive.selectable);
|
||||
}
|
||||
|
||||
if (!result[3] &&
|
||||
!EntityFolder.JUNK.equals(folder.type) &&
|
||||
!EntityFolder.DRAFTS.equals(folder.type)) {
|
||||
if (!result[3] && !EntityFolder.JUNK.equals(folder.type)) {
|
||||
EntityFolder junk = db.folder().getFolderByType(message.account, EntityFolder.JUNK);
|
||||
result[3] = (junk != null && junk.selectable);
|
||||
}
|
||||
|
||||
if (!result[4] &&
|
||||
!EntityFolder.TRASH.equals(folder.type) &&
|
||||
!EntityFolder.JUNK.equals(folder.type)) {
|
||||
if (!result[4] && !EntityFolder.TRASH.equals(folder.type)) {
|
||||
EntityFolder trash = db.folder().getFolderByType(message.account, EntityFolder.TRASH);
|
||||
result[4] = (trash != null && trash.selectable);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue