mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-29 17:11:12 +01:00
Small fix, cleanup
This commit is contained in:
@@ -33,16 +33,11 @@ public interface DaoFolder {
|
||||
" ORDER BY CASE WHEN folder.type = '" + EntityFolder.USER + "' THEN 1 ELSE 0 END")
|
||||
List<EntityFolder> getFolders(long account);
|
||||
|
||||
@Query("SELECT * FROM folder" +
|
||||
" WHERE account = :account" +
|
||||
" AND synchronize = :synchronize" +
|
||||
" ORDER BY CASE WHEN folder.type = '" + EntityFolder.USER + "' THEN 1 ELSE 0 END")
|
||||
List<EntityFolder> getFolders(long account, boolean synchronize);
|
||||
|
||||
@Query("SELECT folder.* FROM folder" +
|
||||
" JOIN account ON account.id = folder.account" +
|
||||
" WHERE account.synchronize AND folder.synchronize")
|
||||
List<EntityFolder> getFoldersSynchronizing();
|
||||
" WHERE folder.synchronize" +
|
||||
" AND (account.synchronize AND NOT account.ondemand)")
|
||||
List<EntityFolder> getFoldersAutoSync();
|
||||
|
||||
@Query("SELECT folder.* FROM folder" +
|
||||
" JOIN account ON account.id = folder.account" +
|
||||
|
||||
@@ -267,7 +267,7 @@ public class FragmentOptions extends FragmentBase implements SharedPreferences.O
|
||||
@Override
|
||||
protected Void onExecute(Context context, Bundle args) {
|
||||
DB db = DB.getInstance(context);
|
||||
List<EntityFolder> folders = db.folder().getFoldersSynchronizing();
|
||||
List<EntityFolder> folders = db.folder().getFoldersAutoSync();
|
||||
for (EntityFolder folder : folders)
|
||||
EntityOperation.sync(db, folder.id);
|
||||
return null;
|
||||
|
||||
@@ -405,7 +405,7 @@ public class FragmentSetup extends FragmentBase {
|
||||
@Override
|
||||
protected Void onExecute(Context context, Bundle args) {
|
||||
DB db = DB.getInstance(context);
|
||||
for (EntityFolder folder : db.folder().getFoldersSynchronizing())
|
||||
for (EntityFolder folder : db.folder().getFoldersAutoSync())
|
||||
EntityOperation.sync(db, folder.id);
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user