mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 13:04:38 +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:
@ -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
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user