« get me outta code hell

data: new sortByPositionInFlash act function - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-04-27 16:55:06 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-04-27 16:56:00 -0300
commit6128ba16c1b5c4c6095e0ddba0977817cce4bc6e (patch)
tree2f22c42534fdfb4e8dfdd3bb1108dd7eaeaeca23 /src/data
parent3a322d96666b8da2b615ffd1c245f3a2f3d0cd90 (diff)
data: new sortByPositionInFlash act function
Fixes #168.

This refactors the duplicated logic with sortByPositionInAlbum
into a new template, sortByPositionInParent.
Diffstat (limited to 'src/data')
-rw-r--r--src/data/yaml.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/data/yaml.js b/src/data/yaml.js
index 1b1195ea..de0b506b 100644
--- a/src/data/yaml.js
+++ b/src/data/yaml.js
@@ -24,6 +24,7 @@ import {
   sortAlbumsTracksChronologically,
   sortAlphabetically,
   sortChronologically,
+  sortFlashesChronologically,
 } from '../util/wiki-data.js';
 
 import find, {bindFind} from '../util/find.js';
@@ -1155,6 +1156,7 @@ export function sortWikiDataArrays(wikiData) {
   Object.assign(wikiData, {
     albumData: sortChronologically(wikiData.albumData.slice()),
     trackData: sortAlbumsTracksChronologically(wikiData.trackData.slice()),
+    flashData: sortFlashesChronologically(wikiData.flashData.slice()),
   });
 
   // Re-link data arrays, so that every object has the new, sorted versions.