Revert "Correct multiple inboxes"

This reverts commit 63c30a8bd0.
master
M66B 3 months ago
parent 08b6261939
commit 6794c42908

@ -2992,16 +2992,9 @@ class Core {
try { try {
db.beginTransaction(); db.beginTransaction();
if (EntityFolder.INBOX.equals(type)) { // Case insensitive if (EntityFolder.INBOX.equals(type)) // Case insensitive
List<EntityFolder> inboxes = db.folder().getFoldersByType(account.id, type); folder = db.folder().getFolderByType(account.id, type);
if (inboxes == null || inboxes.isEmpty()) else
folder = null;
else {
folder = inboxes.get(0);
for (int i = 1; i < inboxes.size(); i++)
db.folder().deleteFolder(inboxes.get(i).id);
}
} else
folder = db.folder().getFolderByName(account.id, fullName); folder = db.folder().getFolderByName(account.id, fullName);
if (folder == null) { if (folder == null) {
EntityFolder parent = null; EntityFolder parent = null;

@ -236,11 +236,6 @@ public interface DaoFolder {
" WHERE account = :account AND type = :type") " WHERE account = :account AND type = :type")
EntityFolder getFolderByType(long account, String type); EntityFolder getFolderByType(long account, String type);
@Query("SELECT folder.* FROM folder" +
" WHERE account = :account AND type = :type" +
" ORDER BY folder.id")
List<EntityFolder> getFoldersByType(long account, String type);
@Query("SELECT folder.* FROM folder" + @Query("SELECT folder.* FROM folder" +
" JOIN account ON account.id = folder.account" + " JOIN account ON account.id = folder.account" +
" WHERE account.synchronize" + " WHERE account.synchronize" +

Loading…
Cancel
Save