timeline: fix day comparison
parent
0d7f1fbf39
commit
59116b637a
|
@ -638,13 +638,10 @@ export default class Timeline extends Mixins(GlobalMixin, UserConfig) {
|
||||||
// changed just to be sure
|
// changed just to be sure
|
||||||
utils.cacheData(url, data);
|
utils.cacheData(url, data);
|
||||||
|
|
||||||
// Check if the response has any delta whatsoever
|
// Check if the response has any delta
|
||||||
// Comparing the set of fileid+etag is good enough
|
|
||||||
if (head.day.detail?.length) {
|
if (head.day.detail?.length) {
|
||||||
const tags = new Set<string>(data.map((photo) => photo.etag + photo.fileid));
|
if (head.day.detail.length === data.length &&
|
||||||
if (head.day.detail &&
|
head.day.detail.every((p, i) => p.fileid === data[i].fileid && p.etag === data[i].etag)
|
||||||
tags.size === head.day.count &&
|
|
||||||
head.day.detail.every((p) => tags.has(p.etag + p.fileid))
|
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue