webmail: make double click on mailbox expand/collapse, and make mailbox text unselectable (so the double click doesn't also select text)

This commit is contained in:
Mechiel Lukkien
2023-09-21 11:40:22 +02:00
parent 941a2311f0
commit 9bc860e207
3 changed files with 21 additions and 1 deletions

View File

@ -4157,6 +4157,16 @@ const newMailboxView = (xmb: api.Mailbox, mailboxlistView: MailboxlistView, othe
cmdOpenActions()
}
},
async function dblclick() {
if (mailboxlistView.mailboxLeaf(mbv)) {
return
}
if (settings.mailboxCollapsed[mbv.mailbox.ID]) {
cmdExpand()
} else {
cmdCollapse()
}
},
async function click() {
mbv.root.focus()
await withStatus('Opening mailbox', mbv.open(true))