mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-22 06:01:12 +00:00
Removed special folder case
Some providers make all folders subfolder of the inbox
This commit is contained in:
parent
2b7c572ce2
commit
94eb9af995
3 changed files with 3 additions and 9 deletions
|
@ -93,7 +93,6 @@ public class EntityFolder implements Serializable {
|
|||
public String error;
|
||||
|
||||
static final String INBOX = "Inbox";
|
||||
static final String INBOX_SUB = "Inbox_sub";
|
||||
static final String OUTBOX = "Outbox";
|
||||
static final String ARCHIVE = "All";
|
||||
static final String DRAFTS = "Drafts";
|
||||
|
@ -127,7 +126,6 @@ public class EntityFolder implements Serializable {
|
|||
|
||||
static final List<String> FOLDER_SORT_ORDER = Arrays.asList(
|
||||
INBOX,
|
||||
INBOX_SUB,
|
||||
OUTBOX,
|
||||
DRAFTS,
|
||||
SENT,
|
||||
|
|
|
@ -1949,10 +1949,6 @@ public class ServiceSynchronize extends LifecycleService {
|
|||
}
|
||||
}
|
||||
|
||||
// Special case
|
||||
if (type == null && fullName.startsWith("INBOX" + separator))
|
||||
type = EntityFolder.INBOX_SUB;
|
||||
|
||||
if (selectable) {
|
||||
int level = EntityFolder.getLevel(separator, fullName);
|
||||
EntityFolder folder = db.folder().getFolderByName(account.id, fullName);
|
||||
|
@ -1971,8 +1967,9 @@ public class ServiceSynchronize extends LifecycleService {
|
|||
} else {
|
||||
Log.i(Helper.TAG, folder.name + " exists");
|
||||
db.folder().setFolderLevel(folder.id, level);
|
||||
if (EntityFolder.USER.equals(folder.type) &&
|
||||
(EntityFolder.INBOX_SUB.equals(type) || EntityFolder.SYSTEM.equals(type)))
|
||||
if ("Inbox_sub".equals(folder.type))
|
||||
db.folder().setFolderType(folder.id, EntityFolder.USER);
|
||||
else if (EntityFolder.USER.equals(folder.type) && EntityFolder.SYSTEM.equals(type))
|
||||
db.folder().setFolderType(folder.id, type);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -221,7 +221,6 @@
|
|||
|
||||
<string name="title_folder_unified">Unified inbox</string>
|
||||
<string name="title_folder_inbox">Inbox</string>
|
||||
<string name="title_folder_inbox_sub">Inbox child</string>
|
||||
<string name="title_folder_outbox">Outbox</string>
|
||||
<string name="title_folder_all">Archive</string>
|
||||
<string name="title_folder_drafts">Drafts</string>
|
||||
|
|
Loading…
Reference in a new issue