From b4be7d036bbe19339c3c8ab66a06ce6f0f9e9db9 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 18 Sep 2026 17:33:46 +0200 Subject: fix(status): only pause/resume a running breaktimer daemon breaktimer.sh's pause and resume arms write the state file whether or not a daemon is running, so statusctl presentation set while the daemon was stopped recorded a phantom paused/running state and the tile then showed Paused or a frozen countdown for a daemon that does not exist. Gate both verbs on btRunning, the singleton's running-or-paused derived state, so a verb is only sent when a daemon actually exists. --- shared/Status.qml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'shared') diff --git a/shared/Status.qml b/shared/Status.qml index 5d799e2..dfb6b83 100644 --- a/shared/Status.qml +++ b/shared/Status.qml @@ -124,11 +124,13 @@ Singleton { root.nolockBeforePresentation = root.nolock; root.setMode("dnd", true); root.setMode("nolock", true); - root.runBreaktimer("pause"); + // pause/resume write the state file whether or not a daemon + // runs, so send the verb only when one exists. + if (root.btRunning) root.runBreaktimer("pause"); } else { root.setMode("dnd", root.dndBeforePresentation); root.setMode("nolock", root.nolockBeforePresentation); - root.runBreaktimer("resume"); + if (root.btRunning) root.runBreaktimer("resume"); } } -- cgit v1.2.3