improve: if applicable set '\\answered' or '$forwarded' flag after a message is sent so the proper icon is shown in the message list view

This commit is contained in:
Sergey Mosin 2023-08-10 17:20:58 -04:00
parent bafd17d029
commit 22691450af

View file

@ -493,6 +493,19 @@ export class ComposePopupView extends AbstractViewPopup {
|| getNotification(Notifications.CantSendMessage));
}
} else {
if (arrayLength(this.aDraftInfo) > 0) {
const flag = {
'reply': '\\answered',
'forward': '$forwarded'
}[this.aDraftInfo[0]];
if (flag) {
const aFlags = MessageUserStore.message().flags();
if (aFlags.indexOf(flag) === -1) {
aFlags.push(flag);
MessageUserStore.message().flags(aFlags);
}
}
}
this.close();
}
setFolderETag(this.draftsFolder(), '');