diff --git a/FAQ.md b/FAQ.md index d2b6b0bd..457e2e86 100644 --- a/FAQ.md +++ b/FAQ.md @@ -10,6 +10,7 @@ Frequently Asked Questions * Full network access (INTERNET): to send and receive email * View network connections (ACCESS_NETWORK_STATE): to monitor internet connectivity changes * Run at startup (RECEIVE_BOOT_COMPLETED): to start monitoring on device start +* Optional: read your contacts (READ_CONTACTS): to autocomplete addresses **(2) Why is there a permanent notification shown?** @@ -24,12 +25,12 @@ Most, if not all, other email apps don't show a notification with the "side effe The low priority status bar notification shows the number of pending operations, which can be: -* Mark message as seen/unseen in remote folder -* Add message to remote folder -* Move message to another remote folder -* Delete message from remote folder -* Send message -* Download attachment +* SEEN: mark message as seen/unseen in remote folder +* ADD: add message to remote folder +* MOVE: move message to another remote folder +* DELETE: delete message from remote folder +* SEND: send message +* ATTACHMENT download attachment **(4) What is a valid security certificate?** diff --git a/app/schemas/eu.faircode.email.DB/1.json b/app/schemas/eu.faircode.email.DB/1.json index 20271fdf..d4e3092f 100644 --- a/app/schemas/eu.faircode.email.DB/1.json +++ b/app/schemas/eu.faircode.email.DB/1.json @@ -2,7 +2,7 @@ "formatVersion": 1, "database": { "version": 1, - "identityHash": "0b5e9888b548ea410934b7082b08a3b6", + "identityHash": "fc698ded287d449f2781e8efa338554d", "entities": [ { "tableName": "identity", @@ -113,7 +113,7 @@ }, { "tableName": "account", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `seen_until` INTEGER, `error` TEXT)", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` TEXT, `host` TEXT NOT NULL, `port` INTEGER NOT NULL, `user` TEXT NOT NULL, `password` TEXT NOT NULL, `primary` INTEGER NOT NULL, `synchronize` INTEGER NOT NULL, `seen_until` INTEGER, `state` TEXT, `error` TEXT)", "fields": [ { "fieldPath": "id", @@ -169,6 +169,12 @@ "affinity": "INTEGER", "notNull": false }, + { + "fieldPath": "state", + "columnName": "state", + "affinity": "TEXT", + "notNull": false + }, { "fieldPath": "error", "columnName": "error", @@ -187,7 +193,7 @@ }, { "tableName": "folder", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `account` INTEGER, `name` TEXT NOT NULL, `type` TEXT NOT NULL, `synchronize` INTEGER NOT NULL, `after` INTEGER NOT NULL, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `account` INTEGER, `name` TEXT NOT NULL, `type` TEXT NOT NULL, `synchronize` INTEGER NOT NULL, `after` INTEGER NOT NULL, `state` TEXT, `error` TEXT, FOREIGN KEY(`account`) REFERENCES `account`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )", "fields": [ { "fieldPath": "id", @@ -225,6 +231,12 @@ "affinity": "INTEGER", "notNull": true }, + { + "fieldPath": "state", + "columnName": "state", + "affinity": "TEXT", + "notNull": false + }, { "fieldPath": "error", "columnName": "error", @@ -752,7 +764,7 @@ ], "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, \"0b5e9888b548ea410934b7082b08a3b6\")" + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"fc698ded287d449f2781e8efa338554d\")" ] } } \ No newline at end of file diff --git a/app/src/main/java/eu/faircode/email/ActivityView.java b/app/src/main/java/eu/faircode/email/ActivityView.java index 0a6d9fae..0ce504ff 100644 --- a/app/src/main/java/eu/faircode/email/ActivityView.java +++ b/app/src/main/java/eu/faircode/email/ActivityView.java @@ -358,10 +358,8 @@ public class ActivityView extends ActivityBase implements FragmentManager.OnBack try { db.beginTransaction(); - for (EntityAccount account : db.account().getAccounts(true)) { - account.seen_until = time; - db.account().updateAccount(account); - } + for (EntityAccount account : db.account().getAccounts(true)) + db.account().setAccountSeenUntil(account.id, time); db.setTransactionSuccessful(); } finally { @@ -500,8 +498,7 @@ public class ActivityView extends ActivityBase implements FragmentManager.OnBack EntityFolder folder = db.folder().getFolder(message.folder); if (!EntityFolder.OUTBOX.equals(folder.type)) for (EntityMessage tmessage : db.message().getMessageByThread(message.account, message.thread)) { - tmessage.ui_seen = true; - db.message().updateMessage(tmessage); + db.message().setMessageUiSeen(tmessage.id, true); EntityOperation.queue(db, tmessage, EntityOperation.SEEN, tmessage.ui_seen); } diff --git a/app/src/main/java/eu/faircode/email/AdapterAccount.java b/app/src/main/java/eu/faircode/email/AdapterAccount.java index 93998d6e..0860f344 100644 --- a/app/src/main/java/eu/faircode/email/AdapterAccount.java +++ b/app/src/main/java/eu/faircode/email/AdapterAccount.java @@ -54,6 +54,7 @@ public class AdapterAccount extends RecyclerView.Adapter + + diff --git a/app/src/main/res/drawable/baseline_cloud_off_24.xml b/app/src/main/res/drawable/baseline_cloud_off_24.xml new file mode 100755 index 00000000..ceba351f --- /dev/null +++ b/app/src/main/res/drawable/baseline_cloud_off_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/baseline_cloud_queue_24.xml b/app/src/main/res/drawable/baseline_cloud_queue_24.xml new file mode 100755 index 00000000..e7dba4ac --- /dev/null +++ b/app/src/main/res/drawable/baseline_cloud_queue_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/layout/item_account.xml b/app/src/main/res/layout/item_account.xml index 0df784e8..f335438b 100644 --- a/app/src/main/res/layout/item_account.xml +++ b/app/src/main/res/layout/item_account.xml @@ -12,6 +12,7 @@ android:layout_marginEnd="6dp" android:layout_marginStart="6dp" android:src="@drawable/baseline_star_24" + android:visibility="visible" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -39,6 +40,16 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" /> + + + app:layout_constraintStart_toEndOf="@id/ivState" + app:layout_constraintTop_toTopOf="@id/ivState" /> + app:layout_constraintTop_toTopOf="@id/ivState" /> + app:layout_constraintTop_toBottomOf="@id/ivState" /> @@ -26,10 +25,10 @@ android:singleLine="true" android:text="Name" android:textAppearance="@style/TextAppearance.AppCompat.Medium" - app:layout_constraintBottom_toBottomOf="@+id/ivMessages" + app:layout_constraintBottom_toBottomOf="@+id/ivEdit" app:layout_constraintEnd_toStartOf="@+id/tvAfter" app:layout_constraintStart_toEndOf="@id/ivEdit" - app:layout_constraintTop_toTopOf="@+id/ivMessages" /> + app:layout_constraintTop_toTopOf="@+id/ivEdit" /> + app:layout_constraintTop_toTopOf="@+id/ivEdit" /> + app:layout_constraintTop_toTopOf="@+id/ivEdit" /> + + + app:layout_constraintBottom_toBottomOf="@id/ivState" + app:layout_constraintStart_toEndOf="@+id/ivState" + app:layout_constraintTop_toTopOf="@id/ivState" /> + app:layout_constraintTop_toTopOf="@id/ivState" /> + app:layout_constraintTop_toTopOf="@id/ivState" /> + app:layout_constraintTop_toBottomOf="@id/ivState" />