mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-04 08:08:16 +02:00
Check possible notification actions
This commit is contained in:
@@ -2218,7 +2218,10 @@ class Core {
|
||||
.setSubText(message.accountName + " · " + folderName);
|
||||
}
|
||||
|
||||
if (notify_trash) {
|
||||
DB db = DB.getInstance(context);
|
||||
|
||||
if (notify_trash &&
|
||||
db.folder().getFolderByType(message.account, EntityFolder.TRASH) != null) {
|
||||
Intent trash = new Intent(context, ServiceUI.class)
|
||||
.setAction("trash:" + message.id)
|
||||
.putExtra("group", group);
|
||||
@@ -2230,7 +2233,8 @@ class Core {
|
||||
mbuilder.addAction(actionTrash.build());
|
||||
}
|
||||
|
||||
if (notify_archive) {
|
||||
if (notify_archive &&
|
||||
db.folder().getFolderByType(message.account, EntityFolder.ARCHIVE) != null) {
|
||||
Intent archive = new Intent(context, ServiceUI.class)
|
||||
.setAction("archive:" + message.id)
|
||||
.putExtra("group", group);
|
||||
@@ -2242,7 +2246,8 @@ class Core {
|
||||
mbuilder.addAction(actionArchive.build());
|
||||
}
|
||||
|
||||
if (notify_reply && message.content) {
|
||||
if (notify_reply && message.content &&
|
||||
db.identity().getComposableIdentities(message.account).size() > 0) {
|
||||
Intent reply = new Intent(context, ActivityCompose.class)
|
||||
.putExtra("action", "reply")
|
||||
.putExtra("reference", message.id);
|
||||
|
||||
Reference in New Issue
Block a user