From 40f5a6ab7cd1a0a30dc1742580d2492435952226 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Mon, 5 Feb 2024 18:02:21 +0100 Subject: [PATCH] Fix timestamp not set on clearing instance saves Set the save's updatedAtMs timestamp when clearing the save list of a reassigned or deleted instance. This fixes the Web UI not updating the saves list to remove the saves when an instance is reassigned. --- packages/controller/src/Controller.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/controller/src/Controller.ts b/packages/controller/src/Controller.ts index 3e81c0c1..d9a1332b 100644 --- a/packages/controller/src/Controller.ts +++ b/packages/controller/src/Controller.ts @@ -876,9 +876,11 @@ export default class Controller { */ clearSavesOfInstance(instanceId: number) { const updates = []; + const now = Date.now(); for (const [id, save] of this.saves) { if (save.instanceId === instanceId) { save.isDeleted = true; + save.updatedAtMs = now; updates.push(save); this.saves.delete(id); }