mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 16:33:47 +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,10 +3606,10 @@ 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);
|
||||
}
|
||||
}
|
||||
const si = selected.indexOf(miv);
|
||||
if (si >= 0) {
|
||||
selected.splice(si, 1);
|
||||
}
|
||||
// Strict cleanup.
|
||||
miv.parent = null;
|
||||
|
|
|
@ -3394,10 +3394,10 @@ 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)
|
||||
}
|
||||
}
|
||||
const si = selected.indexOf(miv)
|
||||
if (si >= 0) {
|
||||
selected.splice(si, 1)
|
||||
}
|
||||
// Strict cleanup.
|
||||
miv.parent = null
|
||||
|
|
Loading…
Reference in a new issue