Fixed recognizing inbox

pull/147/head
M66B 6 years ago
parent 66e9cec9a8
commit bff042ae91

@ -1935,7 +1935,8 @@ public class ServiceSynchronize extends LifecycleService {
String type = null;
boolean selectable = true;
String[] attrs = ((IMAPFolder) ifolder).getAttributes();
Log.i(Helper.TAG, fullName + " attrs=" + TextUtils.join(" ", attrs));
Log.i(Helper.TAG, account.name + ":" + fullName +
" attrs=" + TextUtils.join(" ", attrs));
for (String attr : attrs) {
if ("\\Noselect".equals(attr) || "\\NonExistent".equals(attr))
selectable = false;
@ -1949,6 +1950,9 @@ public class ServiceSynchronize extends LifecycleService {
}
}
if ("INBOX".equals(fullName.toUpperCase()))
type = EntityFolder.INBOX;
if (selectable) {
names.remove(fullName);
@ -1986,7 +1990,8 @@ public class ServiceSynchronize extends LifecycleService {
if ("Inbox_sub".equals(folder.type))
db.folder().setFolderType(folder.id, EntityFolder.USER);
else if (EntityFolder.USER.equals(folder.type) && EntityFolder.SYSTEM.equals(type))
else if (EntityFolder.USER.equals(folder.type) &&
type != null && !EntityFolder.USER.equals(type))
db.folder().setFolderType(folder.id, type);
}
}

Loading…
Cancel
Save