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.
This commit is contained in:
Hornwitser committed 2024-02-06 22:43:04 +01:00
1 parent 48c31b4825
commit 40f5a6ab7c
1 file changed
+2
+2
View File
@@ -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);
}