« 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/listing-spec.js9
-rw-r--r--src/static/lazy-loading.js2
2 files changed, 7 insertions, 4 deletions
diff --git a/src/listing-spec.js b/src/listing-spec.js
index 636e5f67..26910c05 100644
--- a/src/listing-spec.js
+++ b/src/listing-spec.js
@@ -615,9 +615,12 @@ const listingSpec = [
     directory: 'tracks/by-date',
     stringsKey: 'listTracks.byDate',
 
-    data: ({wikiData: {trackData}}) =>
+    data: ({wikiData: {albumData}}) =>
       chunkByProperties(
-        sortChronologically(trackData.filter(t => t.date)),
+        sortByDate(
+          sortChronologically(albumData)
+            .flatMap(album => album.tracks)
+            .filter(track => track.date)),
         ['album', 'date']),
 
     html: (data, {html, language, link}) =>
@@ -632,7 +635,7 @@ const listingSpec = [
           html.tag('dd',
             html.tag('ul',
               tracks.map(track =>
-                track.aka
+                track.originalReleaseTrack
                   ? html.tag('li',
                       {class: 'rerelease'},
                       language.$('listingPage.listTracks.byDate.track.rerelease', {
diff --git a/src/static/lazy-loading.js b/src/static/lazy-loading.js
index b04ad7c2..1df56f08 100644
--- a/src/static/lazy-loading.js
+++ b/src/static/lazy-loading.js
@@ -37,7 +37,7 @@ function lazyLoadMain() {
   if (window.IntersectionObserver) {
     observer = new IntersectionObserver(lazyLoad, {
       rootMargin: '200px',
-      threshold: 1.0,
+      threshold: 0,
     });
     for (i = 0; i < lazyElements.length; i++) {
       observer.observe(lazyElements[i]);