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

@ -4300,6 +4300,16 @@ const newMailboxView = (xmb, mailboxlistView, otherMailbox) => {
else if (e.key === 'b') {
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));