mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 08:23:48 +03:00
webmail: when marking message as unread, also clear its (non)junk flags
This commit is contained in:
parent
ee48cf0dfd
commit
1f604c6a3d
2 changed files with 6 additions and 6 deletions
|
@ -2435,7 +2435,7 @@ const cmdHelp = async () => {
|
|||
['q', 'move to junk folder'],
|
||||
['Q', 'mark not junk'],
|
||||
['a', 'move to archive folder'],
|
||||
['M', 'mark unread'],
|
||||
['M', 'mark unread and clear (non)junk flags'],
|
||||
['m', 'mark read'],
|
||||
['u', 'to next unread message'],
|
||||
['p', 'to root of thread or previous thread'],
|
||||
|
@ -4110,7 +4110,7 @@ const newMsgView = (miv, msglistView, listMailboxes, possibleLabels, messageLoad
|
|||
if (!miv.messageitem.Message.Junk && !miv.messageitem.Message.Notjunk) {
|
||||
window.setTimeout(async () => {
|
||||
const mailboxIsReject = () => !!listMailboxes().find(mb => mb.ID === miv.messageitem.Message.MailboxID && mb.Name === rejectsMailbox);
|
||||
if (!miv.messageitem.Message.Junk && !miv.messageitem.Message.Notjunk && miv.messageitem.Message.ID === msglistView.activeMessageID() && !mailboxIsReject()) {
|
||||
if (!miv.messageitem.Message.Junk && !miv.messageitem.Message.Notjunk && miv.messageitem.Message.Seen && miv.messageitem.Message.ID === msglistView.activeMessageID() && !mailboxIsReject()) {
|
||||
await withStatus('Marking current message as not junk', client.FlagsAdd([miv.messageitem.Message.ID], ['$notjunk']));
|
||||
}
|
||||
}, 5 * 1000);
|
||||
|
@ -4191,7 +4191,7 @@ const newMsglistView = (msgElem, activeMailbox, listMailboxes, setLocationHash,
|
|||
};
|
||||
const cmdMarkNotJunk = async () => { await withStatus('Marking as not junk', client.FlagsAdd(mlv.selected().map(miv => miv.messageitem.Message.ID), ['$notjunk'])); };
|
||||
const cmdMarkRead = async () => { await withStatus('Marking as read', client.FlagsAdd(mlv.selected().map(miv => miv.messageitem.Message.ID), ['\\seen'])); };
|
||||
const cmdMarkUnread = async () => { await withStatus('Marking as not read', client.FlagsClear(mlv.selected().map(miv => miv.messageitem.Message.ID), ['\\seen'])); };
|
||||
const cmdMarkUnread = async () => { await withStatus('Marking as not read', client.FlagsClear(mlv.selected().map(miv => miv.messageitem.Message.ID), ['\\seen', '$junk', '$notjunk'])); };
|
||||
const cmdMute = async () => {
|
||||
const l = mlv.selected();
|
||||
await withStatus('Muting thread', client.ThreadMute(l.map(miv => miv.messageitem.Message.ID), true));
|
||||
|
|
|
@ -1225,7 +1225,7 @@ const cmdHelp = async () => {
|
|||
['q', 'move to junk folder'],
|
||||
['Q', 'mark not junk'],
|
||||
['a', 'move to archive folder'],
|
||||
['M', 'mark unread'],
|
||||
['M', 'mark unread and clear (non)junk flags'],
|
||||
['m', 'mark read'],
|
||||
['u', 'to next unread message'],
|
||||
['p', 'to root of thread or previous thread'],
|
||||
|
@ -3612,7 +3612,7 @@ const newMsgView = (miv: MsgitemView, msglistView: MsglistView, listMailboxes: l
|
|||
if (!miv.messageitem.Message.Junk && !miv.messageitem.Message.Notjunk) {
|
||||
window.setTimeout(async () => {
|
||||
const mailboxIsReject = () => !!listMailboxes().find(mb => mb.ID === miv.messageitem.Message.MailboxID && mb.Name === rejectsMailbox)
|
||||
if (!miv.messageitem.Message.Junk && !miv.messageitem.Message.Notjunk && miv.messageitem.Message.ID === msglistView.activeMessageID() && !mailboxIsReject()) {
|
||||
if (!miv.messageitem.Message.Junk && !miv.messageitem.Message.Notjunk && miv.messageitem.Message.Seen && miv.messageitem.Message.ID === msglistView.activeMessageID() && !mailboxIsReject()) {
|
||||
await withStatus('Marking current message as not junk', client.FlagsAdd([miv.messageitem.Message.ID], ['$notjunk']))
|
||||
}
|
||||
}, 5*1000)
|
||||
|
@ -3762,7 +3762,7 @@ const newMsglistView = (msgElem: HTMLElement, activeMailbox: () => api.Mailbox |
|
|||
}
|
||||
const cmdMarkNotJunk = async () => { await withStatus('Marking as not junk', client.FlagsAdd(mlv.selected().map(miv => miv.messageitem.Message.ID), ['$notjunk'])) }
|
||||
const cmdMarkRead = async () => { await withStatus('Marking as read', client.FlagsAdd(mlv.selected().map(miv => miv.messageitem.Message.ID), ['\\seen'])) }
|
||||
const cmdMarkUnread = async () => { await withStatus('Marking as not read', client.FlagsClear(mlv.selected().map(miv => miv.messageitem.Message.ID), ['\\seen'])) }
|
||||
const cmdMarkUnread = async () => { await withStatus('Marking as not read', client.FlagsClear(mlv.selected().map(miv => miv.messageitem.Message.ID), ['\\seen', '$junk', '$notjunk'])) }
|
||||
const cmdMute = async () => {
|
||||
const l = mlv.selected()
|
||||
await withStatus('Muting thread', client.ThreadMute(l.map(miv => miv.messageitem.Message.ID), true))
|
||||
|
|
Loading…
Reference in a new issue