Apply to all: enable/disable sync

This commit is contained in:
M66B
2021-06-06 10:08:33 +02:00
parent e43cbb46da
commit 3452cc5089
4 changed files with 87 additions and 19 deletions

View File

@@ -325,10 +325,9 @@ public interface DaoFolder {
@Query("UPDATE folder" +
" SET sync_days = :sync_days, keep_days = :keep_days" +
" WHERE account = :account" +
" AND type = '" + EntityFolder.USER + "'" +
" AND (NOT (sync_days IS :sync_days) OR NOT (keep_days IS :keep_days))")
int setFolderProperties(long account, int sync_days, int keep_days);
" WHERE id = :id" +
" AND NOT (sync_days IS :sync_days AND keep_days IS :keep_days)")
int setFolderProperties(long id, int sync_days, int keep_days);
@Query("UPDATE folder SET keywords = :keywords WHERE id = :id AND NOT (keywords IS :keywords)")
int setFolderKeywords(long id, String keywords);