fix: sort nexus walls properly

This commit is contained in:
2 * r + 2 * t 2026-06-06 16:41:08 +10:00
parent b5d6d857e0
commit a1034b0237
2 changed files with 2 additions and 2 deletions

View file

@ -26,7 +26,7 @@ PageBase {
columnSpacing: Tokens.spacing.large columnSpacing: Tokens.spacing.large
Repeater { 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 { WallItem {
required property FileSystemEntry modelData required property FileSystemEntry modelData

View file

@ -105,7 +105,7 @@ PageBase {
for (const w of walls) { for (const w of walls) {
if (w.parentDir !== baseDir) { if (w.parentDir !== baseDir) {
const category = Wallpapers.getCategoryFor(w); 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; categories[category] = w;
} }
} }