fix: sort nexus walls properly
This commit is contained in:
parent
b5d6d857e0
commit
a1034b0237
2 changed files with 2 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ PageBase {
|
|||
columnSpacing: Tokens.spacing.large
|
||||
|
||||
Repeater {
|
||||
model: Wallpapers.list.filter(w => Wallpapers.getCategoryFor(w) === root.nState.selectedWallpaperCategory)
|
||||
model: Wallpapers.list.filter(w => Wallpapers.getCategoryFor(w) === root.nState.selectedWallpaperCategory).sort((a, b) => a.name.localeCompare(b.name))
|
||||
|
||||
WallItem {
|
||||
required property FileSystemEntry modelData
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ PageBase {
|
|||
for (const w of walls) {
|
||||
if (w.parentDir !== baseDir) {
|
||||
const category = Wallpapers.getCategoryFor(w);
|
||||
if (category && !(category in categories))
|
||||
if (category && (!(category in categories) || categories[category].name.localeCompare(w.name) > 0))
|
||||
categories[category] = w;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue