diff --git a/webmail/webmail.js b/webmail/webmail.js index 68a28ec..ee7f586 100644 --- a/webmail/webmail.js +++ b/webmail/webmail.js @@ -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 = ''; diff --git a/webmail/webmail.ts b/webmail/webmail.ts index f5f0a4e..f49231f 100644 --- a/webmail/webmail.ts +++ b/webmail/webmail.ts @@ -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 })