This commit is contained in:
the-djmaze 2023-05-01 12:01:35 +02:00
parent 88279c55e0
commit 32277688af

View file

@ -118,6 +118,13 @@ const
buildTree = (view, parent, items, path) => {
if (items.length) {
try {
// https://github.com/the-djmaze/snappymail/issues/1109
let collator = new Intl.Collator(undefined, {numeric: true, sensitivity: 'base'});
items.sort((a, b) => collator.compare(a.name, b.name));
} catch (e) {
console.error(e);
}
items.forEach(item => {
if (!item.isFile) {
let li = document.createElement('li'),