From f2f15a0c02be1184ec979b76807e2b02ed696c9f Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 31 Aug 2026 19:33:55 +0300 Subject: [PATCH] option to allow overwriting timeline extremes with newer values --- src/stores/timelines.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/stores/timelines.js b/src/stores/timelines.js index 6dda2f23b..0974e1f00 100644 --- a/src/stores/timelines.js +++ b/src/stores/timelines.js @@ -414,7 +414,7 @@ export const useTimelinesStore = defineStore('timelines', { }, // Queues & Timeline manip - updateTimelineExtremes(timeline, pagination = {}) { + updateTimelineExtremes(timeline, pagination = {}, force = false) { // Can't use Math.min/max because it doesn't work with string (duh) const minNew = pagination.maxId ?? last(timeline.order) ?? '' const maxNew = pagination.minId ?? first(timeline.order) ?? '' @@ -422,10 +422,10 @@ export const useTimelinesStore = defineStore('timelines', { const newer = maxNew > timeline.maxId const older = minNew < timeline.minId - if (newer || timeline.maxId === '') { + if (force || newer || timeline.maxId === '') { timeline.maxId = maxNew } - if (older || timeline.minId === '') { + if (force || older || timeline.minId === '') { timeline.minId = minNew } @@ -442,7 +442,7 @@ export const useTimelinesStore = defineStore('timelines', { timeline.visibleStatusIds = new Set([ ...timeline.order.filter((id) => !timeline.ignoredIds.has(id)), ]) - this.updateTimelineExtremes(timeline) + this.updateTimelineExtremes(timeline, {}, true) }, syncOrder(timeline) { timeline.order = timeline.order.filter((id) => timeline.statusIds.has(id))