mirror of
https://github.com/mjl-/mox.git
synced 2024-12-27 08:53:48 +03:00
webmail: when moving out all messages in a thread (none remaining in view), don't cause js error but select next message
removing an item from the selected list should be done regardless of focus, i.e. the code snippet shouldn't have been behind the "if (focus...)" condition.
This commit is contained in:
parent
be5f804d5b
commit
3353062dbe
2 changed files with 8 additions and 8 deletions
|
@ -3606,11 +3606,11 @@ const newMsglistView = (msgElem, listMailboxes, setLocationHash, otherMailbox, p
|
|||
else if (i > 0) {
|
||||
focus = mivs[i - 1];
|
||||
}
|
||||
}
|
||||
const si = selected.indexOf(miv);
|
||||
if (si >= 0) {
|
||||
selected.splice(si, 1);
|
||||
}
|
||||
}
|
||||
// Strict cleanup.
|
||||
miv.parent = null;
|
||||
miv.kids = [];
|
||||
|
|
|
@ -3394,11 +3394,11 @@ const newMsglistView = (msgElem: HTMLElement, listMailboxes: listMailboxes, setL
|
|||
} else if (i > 0) {
|
||||
focus = mivs[i-1]
|
||||
}
|
||||
}
|
||||
const si = selected.indexOf(miv)
|
||||
if (si >= 0) {
|
||||
selected.splice(si, 1)
|
||||
}
|
||||
}
|
||||
// Strict cleanup.
|
||||
miv.parent = null
|
||||
miv.kids = []
|
||||
|
|
Loading…
Reference in a new issue