mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 16:33:47 +03:00
webmail: fix case where tree of mailboxes wasn't displayed properly
for example, when these mailboxes existed: "a", "a.b", "a/b", then "a.b" (. before / in ascii) prevented "a/b" from being displayed in the tree below "a".
This commit is contained in:
parent
aebfd78a9f
commit
affb057a0c
2 changed files with 18 additions and 0 deletions
|
@ -3321,6 +3321,15 @@ const newMailboxlistView = (msglistView, requestNewView, updatePageTitle, setLoc
|
|||
else if (ai >= 0 && bi >= 0 && ai !== bi) {
|
||||
return ai < bi ? -1 : 1;
|
||||
}
|
||||
const la = mbva.mailbox.Name.split('/');
|
||||
const lb = mbvb.mailbox.Name.split('/');
|
||||
let n = Math.min(la.length, lb.length);
|
||||
for (let i = 0; i < n; i++) {
|
||||
if (la[i] === lb[i]) {
|
||||
continue;
|
||||
}
|
||||
return la[i] < lb[i] ? -1 : 1;
|
||||
}
|
||||
return mbva.mailbox.Name < mbvb.mailbox.Name ? -1 : 1;
|
||||
});
|
||||
let prevmailboxname = '';
|
||||
|
|
|
@ -3144,6 +3144,15 @@ const newMailboxlistView = (msglistView: MsglistView, requestNewView: requestNew
|
|||
} else if (ai >= 0 && bi >= 0 && ai !== bi) {
|
||||
return ai < bi ? -1 : 1
|
||||
}
|
||||
const la = mbva.mailbox.Name.split('/')
|
||||
const lb = mbvb.mailbox.Name.split('/')
|
||||
let n = Math.min(la.length, lb.length)
|
||||
for (let i = 0; i < n; i++) {
|
||||
if (la[i] === lb[i]) {
|
||||
continue
|
||||
}
|
||||
return la[i] < lb[i] ? -1 : 1
|
||||
}
|
||||
return mbva.mailbox.Name < mbvb.mailbox.Name ? -1 : 1
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue