From a1ee94f681c858951bbc4fffe94ebd1d4449b6d7 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 10 Aug 2023 12:17:59 -0300 Subject: content: generateFlashNavAccent: match sidebar sort directly --- src/content/dependencies/generateFlashNavAccent.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/content/dependencies') 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); -- cgit 1.3.0-6-gf8a5