« get me outta code hell

data: AAAAAAAAAAAAAAAA sort dates nicely, sort name detail - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things/sorting-rule
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-06-01 23:36:39 -0300
committer(quasar) nebula <qznebula@protonmail.com>2026-06-01 23:36:57 -0300
commit8ff3d7ed83b45817bce192945884c6f813343557 (patch)
tree8a20b10e5df0c5168d7ff1d5c5558aa65817f2fd /src/data/things/sorting-rule
parentd2f7ef2686a06eb72721b500109d432d22e64513 (diff)
data: AAAAAAAAAAAAAAAA sort dates nicely, sort name detail preview
Diffstat (limited to 'src/data/things/sorting-rule')
-rw-r--r--src/data/things/sorting-rule/ThingSortingRule.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/data/things/sorting-rule/ThingSortingRule.js b/src/data/things/sorting-rule/ThingSortingRule.js
index b5cc76dc..6dbaccf7 100644
--- a/src/data/things/sorting-rule/ThingSortingRule.js
+++ b/src/data/things/sorting-rule/ThingSortingRule.js
@@ -51,7 +51,14 @@ export class ThingSortingRule extends SortingRule {
           continue;
         }
 
-        if (lc.endsWith('name')) {
+        if (lc === 'name') {
+          sortByName(sortable, {
+            getName: thing =>
+              thing.nameForSorting ??
+              thing.name,
+          });
+          continue;
+        } else if (lc.endsWith('name')) {
           sortByName(sortable, {getName: get});
           continue;
         }