diff --git a/app/schemas/eu.faircode.email.DB/87.json b/app/schemas/eu.faircode.email.DB/87.json index 95e73b0b7f..f0ba1df601 100644 --- a/app/schemas/eu.faircode.email.DB/87.json +++ b/app/schemas/eu.faircode.email.DB/87.json @@ -2,7 +2,7 @@ "formatVersion": 1, "database": { "version": 87, - "identityHash": "54e4606798a2b98908f5ba9b31401294", + "identityHash": "2329269ef351fecd73eff3e3a525e658", "entities": [ { "tableName": "identity", @@ -1773,27 +1773,10 @@ "foreignKeys": [] } ], - "views": [ - { - "viewName": "accountprop", - "createSql": "CREATE VIEW `${VIEW_NAME}` AS SELECT id, name, color, synchronize, `primary`, notify, browse, swipe_left, swipe_right, created, `order` FROM account" - }, - { - "viewName": "folderprop", - "createSql": "CREATE VIEW `${VIEW_NAME}` AS SELECT id, account, name, type, download, display, unified, notify FROM folder" - }, - { - "viewName": "attachmentprop", - "createSql": "CREATE VIEW `${VIEW_NAME}` AS SELECT id, message, name FROM attachment" - }, - { - "viewName": "operationprop", - "createSql": "CREATE VIEW `${VIEW_NAME}` AS SELECT id, folder, message, name FROM operation" - } - ], + "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '54e4606798a2b98908f5ba9b31401294')" + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '2329269ef351fecd73eff3e3a525e658')" ] } } \ No newline at end of file diff --git a/app/src/main/java/eu/faircode/email/DB.java b/app/src/main/java/eu/faircode/email/DB.java index 7eca0246bf..8fe8c689a6 100644 --- a/app/src/main/java/eu/faircode/email/DB.java +++ b/app/src/main/java/eu/faircode/email/DB.java @@ -68,10 +68,6 @@ import io.requery.android.database.sqlite.RequerySQLiteOpenHelperFactory; EntityLog.class }, views = { - EntityAccountProp.class, - EntityFolderProp.class, - EntityAttachmentProp.class, - EntityOperationProp.class } ) @@ -871,14 +867,6 @@ public abstract class DB extends RoomDatabase { public void migrate(SupportSQLiteDatabase db) { Log.i("DB migration from version " + startVersion + " to " + endVersion); db.execSQL("DROP VIEW `folderview`"); - db.execSQL("CREATE VIEW `accountprop` AS " + - "SELECT id, name, color, synchronize, `primary`, notify, browse, swipe_left, swipe_right, created, `order` FROM account"); - db.execSQL("CREATE VIEW `folderprop` AS " + - "SELECT id, account, name, type, download, display, unified, notify FROM folder"); - db.execSQL("CREATE VIEW `attachmentprop` AS " + - "SELECT id, message, name FROM attachment"); - db.execSQL("CREATE VIEW `operationprop` AS " + - "SELECT id, folder, message, name FROM operation"); } }) .build(); diff --git a/app/src/main/java/eu/faircode/email/DaoAccount.java b/app/src/main/java/eu/faircode/email/DaoAccount.java index 6064531924..963b2613d9 100644 --- a/app/src/main/java/eu/faircode/email/DaoAccount.java +++ b/app/src/main/java/eu/faircode/email/DaoAccount.java @@ -46,7 +46,7 @@ public interface DaoAccount { @Query("SELECT account.*" + ", (SELECT COUNT(message.id)" + " FROM message" + - " JOIN folderprop AS folder ON folder.id = message.folder" + + " JOIN folder ON folder.id = message.folder" + " WHERE message.account = account.id" + " AND folder.type <> '" + EntityFolder.ARCHIVE + "'" + " AND folder.type <> '" + EntityFolder.TRASH + "'" + @@ -60,7 +60,7 @@ public interface DaoAccount { " AND identity.synchronize) AS identities" + ", CASE WHEN drafts.id IS NULL THEN 0 ELSE 1 END AS drafts" + " FROM account" + - " LEFT JOIN folderprop AS drafts ON drafts.account = account.id AND drafts.type = '" + EntityFolder.DRAFTS + "'" + + " LEFT JOIN folder AS drafts ON drafts.account = account.id AND drafts.type = '" + EntityFolder.DRAFTS + "'" + " WHERE :all OR account.synchronize" + " GROUP BY account.id" + " ORDER BY CASE WHEN :all THEN 0 ELSE account.`order` END" + @@ -84,16 +84,16 @@ public interface DaoAccount { " (SELECT COUNT(account.id) FROM account" + " WHERE synchronize" + " AND state = 'connected') AS accounts" + - ", (SELECT COUNT(operation.id) FROM operationprop AS operation" + - " JOIN folderprop AS folder ON folder.id = operation.folder" + - " JOIN accountprop AS account ON account.id = folder.account" + // not outbox + ", (SELECT COUNT(operation.id) FROM operation" + + " JOIN folder ON folder.id = operation.folder" + + " JOIN account ON account.id = folder.account" + // not outbox " WHERE account.synchronize) AS operations") LiveData liveStats(); @Query("SELECT account.id, l.id AS swipe_left, l.type AS left_type, r.id AS swipe_right, r.type AS right_type" + - " FROM accountprop AS account" + - " LEFT JOIN folderprop AS l ON l.id = account.swipe_left" + - " LEFT JOIN folderprop r ON r.id = account.swipe_right") + " FROM account" + + " LEFT JOIN folder l ON l.id = account.swipe_left" + + " LEFT JOIN folder r ON r.id = account.swipe_right") LiveData> liveAccountSwipes(); @Insert diff --git a/app/src/main/java/eu/faircode/email/DaoContact.java b/app/src/main/java/eu/faircode/email/DaoContact.java index a57547221a..9673700d48 100644 --- a/app/src/main/java/eu/faircode/email/DaoContact.java +++ b/app/src/main/java/eu/faircode/email/DaoContact.java @@ -37,7 +37,7 @@ public interface DaoContact { @Query("SELECT contact.*, account.name AS accountName" + " FROM contact" + - " JOIN accountprop AS account ON account.id = contact.account" + + " JOIN account ON account.id = contact.account" + " ORDER BY times_contacted DESC, last_contacted DESC") LiveData> liveContacts(); diff --git a/app/src/main/java/eu/faircode/email/DaoFolder.java b/app/src/main/java/eu/faircode/email/DaoFolder.java index 9ef8f3e501..07aeac5042 100644 --- a/app/src/main/java/eu/faircode/email/DaoFolder.java +++ b/app/src/main/java/eu/faircode/email/DaoFolder.java @@ -45,13 +45,13 @@ public interface DaoFolder { List getFoldersEx(long account); @Query("SELECT folder.* FROM folder" + - " JOIN accountprop AS account ON account.id = folder.account" + + " JOIN account ON account.id = folder.account" + " WHERE account.synchronize" + " AND folder.synchronize AND unified") List getFoldersSynchronizingUnified(); @Query("SELECT folder.* FROM folder" + - " JOIN accountprop AS account ON account.id = folder.account" + + " JOIN account ON account.id = folder.account" + " WHERE folder.id = :folder" + " AND (:search OR (account.synchronize AND account.browse))") EntityFolder getBrowsableFolder(long folder, boolean search); @@ -59,7 +59,7 @@ public interface DaoFolder { @Query("SELECT folder.*" + ", account.`order` AS accountOrder, account.name AS accountName" + " FROM folder" + - " JOIN accountprop AS account ON account.id = folder.account" + + " JOIN account ON account.id = folder.account" + " WHERE account.`synchronize`") List getSortedFolders(); @@ -99,7 +99,7 @@ public interface DaoFolder { ", (SELECT COUNT(operation.id) FROM operation WHERE operation.folder = folder.id) AS operations" + ", (SELECT COUNT(operation.id) FROM operation WHERE operation.folder = folder.id AND operation.state = 'executing') AS executing" + " FROM folder" + - " LEFT JOIN accountprop AS account ON account.id = folder.account" + + " LEFT JOIN account ON account.id = folder.account" + " LEFT JOIN message ON message.folder = folder.id AND NOT message.ui_hide" + " WHERE account.id IS NULL" + " OR (account.`synchronize` AND folder.navigation)" + @@ -107,7 +107,7 @@ public interface DaoFolder { LiveData> liveNavigation(); @Query("SELECT folder.* FROM folder" + - " JOIN accountprop AS account ON account.id = folder.account" + + " JOIN account ON account.id = folder.account" + " WHERE account.synchronize" + " AND account.`primary`" + " AND folder.type = '" + EntityFolder.DRAFTS + "'") @@ -149,19 +149,19 @@ public interface DaoFolder { EntityFolder getFolderByType(long account, String type); @Query("SELECT folder.* FROM folder" + - " JOIN accountprop AS account ON account.id = folder.account" + + " JOIN account ON account.id = folder.account" + " WHERE `primary` AND type = '" + EntityFolder.DRAFTS + "'") EntityFolder getPrimaryDrafts(); @Query("SELECT folder.* FROM folder" + - " JOIN accountprop AS account ON account.id = folder.account" + + " JOIN account ON account.id = folder.account" + " WHERE `primary` AND type = '" + EntityFolder.ARCHIVE + "'") EntityFolder getPrimaryArchive(); @Query("SELECT * FROM folder WHERE type = '" + EntityFolder.OUTBOX + "'") EntityFolder getOutbox(); - @Query("SELECT download FROM folderprop WHERE id = :id") + @Query("SELECT download FROM folder WHERE id = :id") boolean getFolderDownload(long id); @Insert diff --git a/app/src/main/java/eu/faircode/email/DaoIdentity.java b/app/src/main/java/eu/faircode/email/DaoIdentity.java index 12748a8ad9..66510ebf19 100644 --- a/app/src/main/java/eu/faircode/email/DaoIdentity.java +++ b/app/src/main/java/eu/faircode/email/DaoIdentity.java @@ -30,13 +30,13 @@ import java.util.List; @Dao public interface DaoIdentity { @Query("SELECT identity.*, account.name AS accountName FROM identity" + - " JOIN accountprop AS account ON account.id = identity.account" + + " JOIN account ON account.id = identity.account" + " WHERE NOT :synchronize OR account.synchronize") LiveData> liveIdentities(boolean synchronize); @Query("SELECT identity.*, account.name AS accountName FROM identity" + - " JOIN accountprop AS account ON account.id = identity.account" + - " JOIN folderprop AS folder ON folder.account = identity.account AND folder.type = '" + EntityFolder.DRAFTS + "'" + + " JOIN account ON account.id = identity.account" + + " JOIN folder ON folder.account = identity.account AND folder.type = '" + EntityFolder.DRAFTS + "'" + " WHERE (:account IS NULL OR identity.account = :account)" + " AND identity.synchronize" + " AND account.synchronize" + @@ -45,8 +45,8 @@ public interface DaoIdentity { List getComposableIdentities(Long account); @Query("SELECT identity.*, account.name AS accountName FROM identity" + - " JOIN accountprop AS account ON account.id = identity.account" + - " JOIN folderprop AS folder ON folder.account = identity.account AND folder.type = '" + EntityFolder.DRAFTS + "'" + + " JOIN account ON account.id = identity.account" + + " JOIN folder ON folder.account = identity.account AND folder.type = '" + EntityFolder.DRAFTS + "'" + " WHERE (:account IS NULL OR identity.account = :account)" + " AND identity.synchronize" + " AND account.synchronize") diff --git a/app/src/main/java/eu/faircode/email/DaoMessage.java b/app/src/main/java/eu/faircode/email/DaoMessage.java index 2ea4c23cb1..6ceb806d27 100644 --- a/app/src/main/java/eu/faircode/email/DaoMessage.java +++ b/app/src/main/java/eu/faircode/email/DaoMessage.java @@ -48,15 +48,15 @@ public interface DaoMessage { ", COUNT(message.id) AS count" + ", " + unseen_unified + " AS unseen" + ", " + unflagged_unified + " AS unflagged" + - ", (SELECT COUNT(a.id) FROM attachmentprop a WHERE a.message = message.id) AS attachments" + + ", (SELECT COUNT(a.id) FROM attachment a WHERE a.message = message.id) AS attachments" + ", SUM(CASE WHEN folder.type = '" + EntityFolder.DRAFTS + "' THEN 1 ELSE 0 END) AS drafts" + ", COUNT(DISTINCT CASE WHEN message.msgid IS NULL THEN message.id ELSE message.msgid END) AS visible" + ", SUM(message.size) AS totalSize" + ", MAX(CASE WHEN :found OR folder.unified THEN message.received ELSE 0 END) AS dummy" + " FROM message" + - " JOIN accountprop AS account ON account.id = message.account" + + " JOIN account ON account.id = message.account" + " LEFT JOIN identity ON identity.id = message.identity" + - " JOIN folderprop AS folder ON folder.id = message.folder" + + " JOIN folder ON folder.id = message.folder" + " WHERE account.`synchronize`" + " AND (NOT message.ui_hide OR :debug)" + " AND (NOT :found OR ui_found = :found)" + @@ -94,16 +94,16 @@ public interface DaoMessage { ", COUNT(message.id) AS count" + ", " + unseen_folder + " AS unseen" + ", " + unflagged_folder + " AS unflagged" + - ", (SELECT COUNT(a.id) FROM attachmentprop a WHERE a.message = message.id) AS attachments" + + ", (SELECT COUNT(a.id) FROM attachment a WHERE a.message = message.id) AS attachments" + ", SUM(CASE WHEN folder.type = '" + EntityFolder.DRAFTS + "' THEN 1 ELSE 0 END) AS drafts" + ", COUNT(DISTINCT CASE WHEN message.msgid IS NULL THEN message.id ELSE message.msgid END) AS visible" + ", SUM(message.size) AS totalSize" + ", MAX(CASE WHEN folder.id = :folder THEN message.received ELSE 0 END) AS dummy" + " FROM message" + - " JOIN accountprop AS account ON account.id = message.account" + + " JOIN account ON account.id = message.account" + " LEFT JOIN identity ON identity.id = message.identity" + - " JOIN folderprop AS folder ON folder.id = message.folder" + - " JOIN folderprop AS f ON f.id = :folder" + + " JOIN folder ON folder.id = message.folder" + + " JOIN folder AS f ON f.id = :folder" + " WHERE (message.account = f.account OR " + is_outbox + ")" + " AND (NOT message.ui_hide OR :debug)" + " AND (NOT :found OR ui_found = :found)" + @@ -137,14 +137,14 @@ public interface DaoMessage { ", 1 AS count" + ", CASE WHEN message.ui_seen THEN 0 ELSE 1 END AS unseen" + ", CASE WHEN message.ui_flagged THEN 0 ELSE 1 END AS unflagged" + - ", (SELECT COUNT(a.id) FROM attachmentprop a WHERE a.message = message.id) AS attachments" + + ", (SELECT COUNT(a.id) FROM attachment a WHERE a.message = message.id) AS attachments" + ", CASE WHEN folder.type = '" + EntityFolder.DRAFTS + "' THEN 1 ELSE 0 END AS drafts" + ", 1 AS visible" + ", message.size AS totalSize" + " FROM message" + - " JOIN accountprop AS account ON account.id = message.account" + + " JOIN account ON account.id = message.account" + " LEFT JOIN identity ON identity.id = message.identity" + - " JOIN folderprop AS folder ON folder.id = message.folder" + + " JOIN folder ON folder.id = message.folder" + " WHERE message.account = :account" + " AND message.thread = :thread" + " AND (:id IS NULL OR message.id = :id)" + @@ -157,7 +157,7 @@ public interface DaoMessage { ", COUNT(message.id) AS count" + ", SUM(message.ui_seen) AS seen" + " FROM message" + - " JOIN accountprop AS account ON account.id = message.account" + + " JOIN account ON account.id = message.account" + " WHERE message.account = :account" + " AND message.thread = :thread" + " AND (:id IS NULL OR message.id = :id)" + @@ -165,7 +165,7 @@ public interface DaoMessage { " GROUP BY account.id") LiveData liveThreadStats(long account, String thread, Long id); - @Query("SELECT message.id FROM folderprop AS folder" + + @Query("SELECT message.id FROM folder" + " JOIN message ON message.folder = folder.id" + " WHERE CASE WHEN :folder IS NULL THEN folder.unified ELSE folder.id = :folder END" + " AND ui_hide") @@ -208,7 +208,7 @@ public interface DaoMessage { List getMessageIdsByFolder(Long folder); @Query("SELECT message.id" + - " FROM folderprop AS folder" + + " FROM folder" + " JOIN message ON message.folder = folder.id" + " WHERE CASE WHEN :folder IS NULL THEN folder.unified ELSE folder.id = :folder END" + " AND NOT ui_hide" + @@ -243,14 +243,14 @@ public interface DaoMessage { ", 1 AS count" + ", CASE WHEN message.ui_seen THEN 0 ELSE 1 END AS unseen" + ", CASE WHEN message.ui_flagged THEN 0 ELSE 1 END AS unflagged" + - ", (SELECT COUNT(a.id) FROM attachmentprop a WHERE a.message = message.id) AS attachments" + + ", (SELECT COUNT(a.id) FROM attachment a WHERE a.message = message.id) AS attachments" + ", CASE WHEN folder.type = '" + EntityFolder.DRAFTS + "' THEN 1 ELSE 0 END AS drafts" + ", 1 AS visible" + ", message.size AS totalSize" + " FROM message" + - " JOIN accountprop AS account ON account.id = message.account" + + " JOIN account ON account.id = message.account" + " LEFT JOIN identity ON identity.id = message.identity" + - " JOIN folderprop AS folder ON folder.id = message.folder" + + " JOIN folder ON folder.id = message.folder" + " WHERE message.id = :id") LiveData liveMessage(long id); @@ -266,9 +266,9 @@ public interface DaoMessage { ", 1 AS visible" + ", message.size AS totalSize" + " FROM message" + - " JOIN accountprop AS account ON account.id = message.account" + + " JOIN account ON account.id = message.account" + " LEFT JOIN identity ON identity.id = message.identity" + - " JOIN folderprop AS folder ON folder.id = message.folder" + + " JOIN folder ON folder.id = message.folder" + " WHERE account.`synchronize`" + " AND folder.notify" + " AND (account.created IS NULL OR message.received > account.created)" + @@ -279,8 +279,8 @@ public interface DaoMessage { LiveData> liveUnseenNotify(); @Query("SELECT COUNT(message.id) FROM message" + - " JOIN accountprop AS account ON account.id = message.account" + - " JOIN folderprop AS folder ON folder.id = message.folder" + + " JOIN account ON account.id = message.account" + + " JOIN folder ON folder.id = message.folder" + " WHERE account.`synchronize`" + " AND folder.unified" + " AND (account.created IS NULL OR message.received > account.created)" + @@ -298,7 +298,7 @@ public interface DaoMessage { List getUids(long folder, Long received); @Query("SELECT message.* FROM message" + - " JOIN folderprop AS folder on folder.id = message.folder" + + " JOIN folder on folder.id = message.folder" + " WHERE message.account = :account" + " AND folder.type = '" + EntityFolder.OUTBOX + "'" + " AND sent IS NOT NULL") @@ -398,7 +398,7 @@ public interface DaoMessage { @Query("UPDATE message SET ui_ignored = 1" + " WHERE NOT ui_ignored" + - " AND folder IN (SELECT id FROM folderprop WHERE type = '" + EntityFolder.INBOX + "')") + " AND folder IN (SELECT id FROM folder WHERE type = '" + EntityFolder.INBOX + "')") int ignoreAll(); @Query("UPDATE message SET ui_found = 1" + @@ -436,7 +436,7 @@ public interface DaoMessage { " WHERE folder = :folder" + " AND uid IS NULL" + " AND NOT EXISTS" + - " (SELECT * FROM operationprop AS operation" + + " (SELECT * FROM operation" + " WHERE operation.message = message.id" + " AND operation.name = '" + EntityOperation.ADD + "')") int deleteOrphans(long folder); diff --git a/app/src/main/java/eu/faircode/email/DaoOperation.java b/app/src/main/java/eu/faircode/email/DaoOperation.java index 883babe697..a20012791b 100644 --- a/app/src/main/java/eu/faircode/email/DaoOperation.java +++ b/app/src/main/java/eu/faircode/email/DaoOperation.java @@ -32,9 +32,9 @@ public interface DaoOperation { " ,((account.synchronize IS NULL OR account.synchronize)" + " AND (NOT folder.account IS NULL OR identity.synchronize IS NULL OR identity.synchronize)) AS synchronize" + " FROM operation" + - " JOIN folderprop AS folder ON folder.id = operation.folder" + + " JOIN folder ON folder.id = operation.folder" + " LEFT JOIN message ON message.id = operation.message" + - " LEFT JOIN accountprop AS account ON account.id = message.account OR account.id = folder.account" + + " LEFT JOIN account ON account.id = message.account OR account.id = folder.account" + " LEFT JOIN identity ON identity.id = message.identity" + " ORDER BY" + " CASE WHEN operation.name = '" + EntityOperation.SYNC + "' THEN" + @@ -45,9 +45,9 @@ public interface DaoOperation { LiveData> liveOperations(); String GET_OPS_FOLDER = "SELECT operation.* FROM operation" + - " JOIN folderprop AS folder ON folder.id = operation.folder" + + " JOIN folder ON folder.id = operation.folder" + " LEFT JOIN message ON message.id = operation.message" + - " LEFT JOIN accountprop AS account ON account.id = message.account" + + " LEFT JOIN account ON account.id = message.account" + " LEFT JOIN identity ON identity.id = message.identity" + " WHERE operation.folder = :folder" + " AND (account.synchronize IS NULL OR account.synchronize)" + @@ -70,7 +70,7 @@ public interface DaoOperation { " FROM operation") LiveData liveStats(); - @Query("SELECT COUNT(operation.id) FROM operationprop AS operation" + + @Query("SELECT COUNT(operation.id) FROM operation" + " WHERE operation.name = '" + EntityOperation.SEND + "'") LiveData liveUnsent(); @@ -83,12 +83,12 @@ public interface DaoOperation { @Query("SELECT * FROM operation WHERE error IS NOT NULL") List getOperationsError(); - @Query("SELECT COUNT(id) FROM operationprop AS operation" + + @Query("SELECT COUNT(id) FROM operation" + " WHERE folder = :folder" + " AND (:name IS NULL OR operation.name = :name)") int getOperationCount(long folder, String name); - @Query("SELECT COUNT(id) FROM operationprop" + + @Query("SELECT COUNT(id) FROM operation" + " WHERE folder = :folder" + " AND message = :message") int getOperationCount(long folder, long message); diff --git a/app/src/main/java/eu/faircode/email/DaoRule.java b/app/src/main/java/eu/faircode/email/DaoRule.java index 512a14f4b5..6562824ff7 100644 --- a/app/src/main/java/eu/faircode/email/DaoRule.java +++ b/app/src/main/java/eu/faircode/email/DaoRule.java @@ -41,14 +41,14 @@ public interface DaoRule { List getEnabledRules(long folder); @Query("SELECT rule.*, folder.account, folder.name AS folderName, account.name AS accountName FROM rule" + - " JOIN folderprop AS folder ON folder.id = rule.folder" + - " JOIN accountprop AS account ON account.id = folder.account" + + " JOIN folder ON folder.id = rule.folder" + + " JOIN account ON account.id = folder.account" + " WHERE rule.id = :id") TupleRuleEx getRule(long id); @Query("SELECT rule.*, folder.account, folder.name AS folderName, account.name AS accountName FROM rule" + - " JOIN folderprop AS folder ON folder.id = rule.folder" + - " JOIN accountprop AS account ON account.id = folder.account" + + " JOIN folder ON folder.id = rule.folder" + + " JOIN account ON account.id = folder.account" + " WHERE rule.folder = :folder" + " ORDER BY `order`, name COLLATE NOCASE") LiveData> liveRules(long folder); diff --git a/app/src/main/java/eu/faircode/email/EntityAccountProp.java b/app/src/main/java/eu/faircode/email/EntityAccountProp.java deleted file mode 100644 index 491ba451af..0000000000 --- a/app/src/main/java/eu/faircode/email/EntityAccountProp.java +++ /dev/null @@ -1,44 +0,0 @@ -package eu.faircode.email; - -/* - This file is part of FairEmail. - - FairEmail is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - FairEmail is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with FairEmail. If not, see . - - Copyright 2018-2019 by Marcel Bokhorst (M66B) -*/ - -import androidx.annotation.NonNull; -import androidx.room.DatabaseView; - -@DatabaseView( - viewName = "accountprop", - value = "SELECT id, name, color, synchronize, `primary`, notify, browse, swipe_left, swipe_right, created, `order` FROM account") -public class EntityAccountProp { - public Long id; - public String name; - public Integer color; - @NonNull - public Boolean synchronize; - @NonNull - public Boolean primary; - @NonNull - public Boolean notify; - @NonNull - public Boolean browse = true; - public Long swipe_left; - public Long swipe_right; - public Long created; - public Integer order; -} diff --git a/app/src/main/java/eu/faircode/email/EntityAttachmentProp.java b/app/src/main/java/eu/faircode/email/EntityAttachmentProp.java deleted file mode 100644 index 6aac4e3fea..0000000000 --- a/app/src/main/java/eu/faircode/email/EntityAttachmentProp.java +++ /dev/null @@ -1,33 +0,0 @@ -package eu.faircode.email; - -/* - This file is part of FairEmail. - - FairEmail is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - FairEmail is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with FairEmail. If not, see . - - Copyright 2018-2019 by Marcel Bokhorst (M66B) -*/ - -import androidx.annotation.NonNull; -import androidx.room.DatabaseView; - -@DatabaseView( - viewName = "attachmentprop", - value = "SELECT id, message, name FROM attachment") -public class EntityAttachmentProp { - public Long id; - @NonNull - public Long message; - public String name; -} diff --git a/app/src/main/java/eu/faircode/email/EntityFolderProp.java b/app/src/main/java/eu/faircode/email/EntityFolderProp.java deleted file mode 100644 index ed3812f919..0000000000 --- a/app/src/main/java/eu/faircode/email/EntityFolderProp.java +++ /dev/null @@ -1,42 +0,0 @@ -package eu.faircode.email; - -/* - This file is part of FairEmail. - - FairEmail is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - FairEmail is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with FairEmail. If not, see . - - Copyright 2018-2019 by Marcel Bokhorst (M66B) -*/ - -import androidx.annotation.NonNull; -import androidx.room.DatabaseView; - -@DatabaseView( - viewName = "folderprop", - value = "SELECT id, account, name, type, download, display, unified, notify FROM folder") -public class EntityFolderProp { - public Long id; - public Long account; - @NonNull - public String name; - @NonNull - public String type; - @NonNull - public Boolean download = true; - public String display; - @NonNull - public Boolean unified = false; - @NonNull - public Boolean notify = false; -} diff --git a/app/src/main/java/eu/faircode/email/EntityOperationProp.java b/app/src/main/java/eu/faircode/email/EntityOperationProp.java deleted file mode 100644 index 76dcf5e523..0000000000 --- a/app/src/main/java/eu/faircode/email/EntityOperationProp.java +++ /dev/null @@ -1,35 +0,0 @@ -package eu.faircode.email; - -/* - This file is part of FairEmail. - - FairEmail is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - FairEmail is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with FairEmail. If not, see . - - Copyright 2018-2019 by Marcel Bokhorst (M66B) -*/ - -import androidx.annotation.NonNull; -import androidx.room.DatabaseView; - -@DatabaseView( - viewName = "operationprop", - value = "SELECT id, folder, message, name FROM operation") -public class EntityOperationProp { - public Long id; - @NonNull - public Long folder; - public Long message; - @NonNull - public String name; -}