Always sync unified system folders

pull/172/head
M66B 5 years ago
parent 91554073ff
commit a82d921530

@ -54,9 +54,9 @@ public interface DaoFolder {
@Query("SELECT folder.* FROM folder" +
" JOIN account ON account.id = folder.account" +
" WHERE account.synchronize" +
" AND folder.synchronize" +
" AND (NOT :synchronizing OR folder.synchronize)" +
" AND ((:type IS NULL AND folder.unified) OR folder.type = :type)")
List<EntityFolder> getFoldersSynchronizingUnified(String type);
List<EntityFolder> getFoldersUnified(String type, boolean synchronizing);
@Query("SELECT folder.* FROM folder" +
" JOIN account ON account.id = folder.account" +

@ -350,7 +350,7 @@ public class FragmentAccounts extends FragmentBase {
db.beginTransaction();
// Unified inbox
List<EntityFolder> folders = db.folder().getFoldersSynchronizingUnified(null);
List<EntityFolder> folders = db.folder().getFoldersUnified(null, true);
for (EntityFolder folder : folders) {
EntityOperation.sync(context, folder.id, true);

@ -337,7 +337,7 @@ public class FragmentFolders extends FragmentBase {
if (aid < 0) {
// Unified inbox
List<EntityFolder> folders = db.folder().getFoldersSynchronizingUnified(null);
List<EntityFolder> folders = db.folder().getFoldersUnified(null, true);
for (EntityFolder folder : folders) {
EntityOperation.sync(context, folder.id, true);

@ -1304,7 +1304,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
List<EntityFolder> folders = new ArrayList<>();
if (fid < 0)
folders.addAll(db.folder().getFoldersSynchronizingUnified(type));
folders.addAll(db.folder().getFoldersUnified(type, type == null));
else {
EntityFolder folder = db.folder().getFolder(fid);
if (folder != null)

Loading…
Cancel
Save