From 39472f666922203c78820b8f12780a059cc3973d Mon Sep 17 00:00:00 2001 From: Durand Louis <40764414+Paloys@users.noreply.github.com> Date: Mon, 12 Jan 2026 16:48:29 +0100 Subject: [PATCH 1/2] Fixed reset not considering the message's argument --- src/util/LSOCommandSink.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/util/LSOCommandSink.ts b/src/util/LSOCommandSink.ts index 7857c030a..8f99a4f49 100644 --- a/src/util/LSOCommandSink.ts +++ b/src/util/LSOCommandSink.ts @@ -111,13 +111,12 @@ export class LSOCommandSink { return result; } - public async reset(): Promise { + public async reset(updateSplits: boolean | undefined): Promise { if (this.locked) { return CommandError.Busy; } - let updateSplits = true; - if (this.timer.currentAttemptHasNewBestTimes()) { + if (updateSplits === undefined && this.timer.currentAttemptHasNewBestTimes()) { const [result] = await showDialog({ title: "Save Best Times?", description: From 9aeb678bf0070c85108ea05b995af08c29458db5 Mon Sep 17 00:00:00 2001 From: Durand Louis <40764414+Paloys@users.noreply.github.com> Date: Mon, 12 Jan 2026 17:01:07 +0100 Subject: [PATCH 2/2] Fixed some missing type considerations --- src/ui/views/TimerView.tsx | 2 +- src/util/LSOCommandSink.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ui/views/TimerView.tsx b/src/ui/views/TimerView.tsx index 1d07f92de..5d34d1821 100644 --- a/src/ui/views/TimerView.tsx +++ b/src/ui/views/TimerView.tsx @@ -180,7 +180,7 @@ function View({ diff --git a/src/util/LSOCommandSink.ts b/src/util/LSOCommandSink.ts index 8f99a4f49..359c27e7b 100644 --- a/src/util/LSOCommandSink.ts +++ b/src/util/LSOCommandSink.ts @@ -111,7 +111,7 @@ export class LSOCommandSink { return result; } - public async reset(updateSplits: boolean | undefined): Promise { + public async reset(updateSplits?: boolean): Promise { if (this.locked) { return CommandError.Busy; } @@ -129,7 +129,7 @@ export class LSOCommandSink { updateSplits = result === 0; } - const result = this.timer.reset(updateSplits) as CommandResult; + const result = this.timer.reset(updateSplits ?? true) as CommandResult; if (isEvent(result)) { this.callbacks.handleEvent(result);