mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 12:24:38 +03:00
webmail: add button to mark a mailbox and its children as read
this sets the seen flag on all messages in the mailbox and its children.
This commit is contained in:
@ -5149,6 +5149,13 @@ const newMailboxView = (xmb: api.Mailbox, mailboxlistView: MailboxlistView, othe
|
||||
|
||||
const remove = popover(actionBtn, {transparent: true},
|
||||
dom.div(style({display: 'flex', flexDirection: 'column', gap: '.5ex'}),
|
||||
dom.div(
|
||||
dom.clickbutton('Mark as read', attr.title('Mark all messages in the mailbox and its sub mailboxes as read.'), async function click() {
|
||||
remove()
|
||||
const mailboxIDs = [mbv.mailbox.ID, ...mailboxlistView.mailboxes().filter(mb => mb.Name.startsWith(mbv.mailbox.Name+'/')).map(mb => mb.ID)]
|
||||
await withStatus('Marking mailboxes as read', client.MailboxesMarkRead(mailboxIDs))
|
||||
}),
|
||||
),
|
||||
dom.div(
|
||||
dom.clickbutton('Move to trash', attr.title('Move mailbox, its messages and its mailboxes to the trash.'), async function click() {
|
||||
if (!trashmb) {
|
||||
|
Reference in New Issue
Block a user