From 59116b637a21de2308a034b0ff063b82605fd6a9 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Sun, 16 Oct 2022 18:22:59 -0700 Subject: [PATCH] timeline: fix day comparison --- src/components/Timeline.vue | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/Timeline.vue b/src/components/Timeline.vue index b5d4dfd7..11eb5bc7 100644 --- a/src/components/Timeline.vue +++ b/src/components/Timeline.vue @@ -638,13 +638,10 @@ export default class Timeline extends Mixins(GlobalMixin, UserConfig) { // changed just to be sure utils.cacheData(url, data); - // Check if the response has any delta whatsoever - // Comparing the set of fileid+etag is good enough + // Check if the response has any delta if (head.day.detail?.length) { - const tags = new Set(data.map((photo) => photo.etag + photo.fileid)); - if (head.day.detail && - tags.size === head.day.count && - head.day.detail.every((p) => tags.has(p.etag + p.fileid)) + if (head.day.detail.length === data.length && + head.day.detail.every((p, i) => p.fileid === data[i].fileid && p.etag === data[i].etag) ) { return; }