mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Resolve #1109
This commit is contained in:
parent
88279c55e0
commit
32277688af
1 changed files with 7 additions and 0 deletions
|
|
@ -118,6 +118,13 @@ const
|
||||||
|
|
||||||
buildTree = (view, parent, items, path) => {
|
buildTree = (view, parent, items, path) => {
|
||||||
if (items.length) {
|
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 => {
|
items.forEach(item => {
|
||||||
if (!item.isFile) {
|
if (!item.isFile) {
|
||||||
let li = document.createElement('li'),
|
let li = document.createElement('li'),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue