diff --git a/com.pdma.notion-timer.sdPlugin/bin/plugin.js b/com.pdma.notion-timer.sdPlugin/bin/plugin.js index 0aecbf0..d1f5d27 100644 --- a/com.pdma.notion-timer.sdPlugin/bin/plugin.js +++ b/com.pdma.notion-timer.sdPlugin/bin/plugin.js @@ -6438,7 +6438,7 @@ async function stopTimer(token, entryId) { } // src/plugin.ts -var CURRENT_VERSION = "1.0.42"; +var CURRENT_VERSION = "1.0.43"; var GITEA_BASE = "https://gitea.pdmarf.co.uk/pdm/stream_deck_notion_timer/raw/branch/stable-rebuild"; var SIGNING_PUBLIC_KEY = `-----BEGIN PUBLIC KEY----- MCowBQYDK2VwAyEAN7ko8TUpuPzPAJuKAZCRjV0c4ZSlou5d9pUAF6o12b4= @@ -6637,7 +6637,15 @@ var TimerToggle = class extends SingletonAction { await sendProjectsToPI(); } async onKeyDown(ev) { - if (this.keyDownBusy) return; + if (this.keyDownBusy) { + const title = buttonTitle(ev.payload.settings.projectName || ""); + const shouldBeRunning = memRunningActionId === ev.action.id; + await Promise.all([ + ev.action.setState(shouldBeRunning ? 1 : 0), + ev.action.setTitle(shouldBeRunning ? `\u23F1 ${title}` : title) + ]); + return; + } this.keyDownBusy = true; try { const { projectId, projectName } = ev.payload.settings; diff --git a/com.pdma.notion-timer.sdPlugin/bin/plugin.js.sig b/com.pdma.notion-timer.sdPlugin/bin/plugin.js.sig index b626d78..d73511c 100644 --- a/com.pdma.notion-timer.sdPlugin/bin/plugin.js.sig +++ b/com.pdma.notion-timer.sdPlugin/bin/plugin.js.sig @@ -1 +1,3 @@ -HeÒ¾à�¡21™ßC'Ý—ÿ9ƒx¤,$2&úöö¡rÅYËb’L¸ËeìÉ.ËQ:¶þõub;B™¢& \ No newline at end of file +íü„«ÚƒJºh^©A׊[ÈÍ +Ìg»Jµmã +SÙ¹mš']ï´y�j$¬<ÎÇÙÃ5ef «?eó=™y– \ No newline at end of file diff --git a/src/plugin.ts b/src/plugin.ts index a42f5aa..29a17e4 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -1,4 +1,4 @@ -const CURRENT_VERSION = "1.0.42"; +const CURRENT_VERSION = "1.0.43"; const GITEA_BASE = "https://gitea.pdmarf.co.uk/pdm/stream_deck_notion_timer/raw/branch/stable-rebuild"; const SIGNING_PUBLIC_KEY = `-----BEGIN PUBLIC KEY----- MCowBQYDK2VwAyEAN7ko8TUpuPzPAJuKAZCRjV0c4ZSlou5d9pUAF6o12b4= @@ -243,7 +243,18 @@ class TimerToggle extends SingletonAction { // Global lock across ALL buttons of this action, not just this one — otherwise // near-simultaneous presses on two different buttons both read memRunningActionId // as "nothing running" and both start a timer in Notion. - if (this.keyDownBusy) return; + if (this.keyDownBusy) { + // Blocked press: redraw THIS button to match known truth instead of leaving + // whatever it was already showing (which can be stale from an out-of-band + // Notion edit) — a pure visual correction, no Notion calls. + const title = buttonTitle(ev.payload.settings.projectName || ""); + const shouldBeRunning = memRunningActionId === ev.action.id; + await Promise.all([ + ev.action.setState(shouldBeRunning ? 1 : 0), + ev.action.setTitle(shouldBeRunning ? `â�± ${title}` : title), + ]); + return; + } this.keyDownBusy = true; try { const { projectId, projectName } = ev.payload.settings; diff --git a/version.json b/version.json index ff87f4e..431bac7 100644 --- a/version.json +++ b/version.json @@ -1 +1 @@ -{ "version": "1.0.42" } +{ "version": "1.0.43" }