« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/content/dependencies/generateFlashNavAccent.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/content/dependencies/generateFlashNavAccent.js b/src/content/dependencies/generateFlashNavAccent.js
index 1e2d1852..c56e614f 100644
--- a/src/content/dependencies/generateFlashNavAccent.js
+++ b/src/content/dependencies/generateFlashNavAccent.js
@@ -1,5 +1,4 @@
 import {empty} from '../../util/sugar.js';
-import {sortFlashesChronologically} from '../../util/wiki-data.js';
 
 export default {
   contentDependencies: [
@@ -9,13 +8,16 @@ export default {
 
   extraDependencies: ['html', 'language', 'wikiData'],
 
-  sprawl({flashData}) {
-    return {flashData};
+  sprawl({flashActData}) {
+    return {flashActData};
   },
 
   query(sprawl, flash) {
+    // Don't sort chronologically here. The previous/next buttons should match
+    // the order in the sidebar, by act rather than date.
     const flashes =
-      sortFlashesChronologically(sprawl.flashData.slice());
+      sprawl.flashActData
+        .flatMap(act => act.flashes);
 
     const index = flashes.indexOf(flash);