Only set flag \Deleted when Trash is set to "do not use"

This commit is contained in:
the-djmaze 2024-07-14 22:55:04 +02:00
parent 50e30dbb6e
commit b70860c903
2 changed files with 10 additions and 3 deletions

View file

@ -404,8 +404,11 @@ export class MailMessageList extends AbstractViewRight {
// User setting hideDeleted || immediatelyMoveToTrash ?? // User setting hideDeleted || immediatelyMoveToTrash ??
deleteCommand() { deleteCommand() {
// moveMessagesToFolderType(FolderType.Trash); /**
if (UNUSED_OPTION_VALUE === FolderUserStore.trashFolder() || '' === FolderUserStore.trashFolder()) { * When FolderUserStore.trashFolder is set to "Do not use",
* flag as \Deleted for removal by later EXPUNGE
*/
if (UNUSED_OPTION_VALUE === FolderUserStore.trashFolder()) {
listAction( listAction(
FolderUserStore.currentFolderFullName(), FolderUserStore.currentFolderFullName(),
MessageSetAction.SetDeleted, MessageSetAction.SetDeleted,

View file

@ -105,7 +105,11 @@ export class MailMessageView extends AbstractViewRight {
createCommand(() => setAction(action), this.messageVisible), createCommand(() => setAction(action), this.messageVisible),
createCommandDeleteHelper = () => createCommandDeleteHelper = () =>
createCommand(() => { createCommand(() => {
if (UNUSED_OPTION_VALUE === FolderUserStore.trashFolder() || '' === FolderUserStore.trashFolder()) { /**
* When FolderUserStore.trashFolder is set to "Do not use",
* flag as \Deleted for removal by later EXPUNGE
*/
if (UNUSED_OPTION_VALUE === FolderUserStore.trashFolder()) {
setAction(MessageSetAction.SetDeleted); setAction(MessageSetAction.SetDeleted);
} else { } else {
const message = currentMessage(); const message = currentMessage();