v1.0.45: delay blocked-press icon correction to avoid native flash collision

Diagnosed via instrumented logging: the v1.0.44 blocked-press redraw
was calling setState()/setTitle() successfully (no error, confirmed
in logs) but Stream Deck wasn't visually applying it — the corrective
image call was landing too close to Stream Deck's own native
key-press flash animation and getting silently dropped. Forcing a
page navigation away and back always redrew correctly, proving the
tracked state was right all along and this was purely a rendering
timing issue. Adding a 150ms delay before the corrective redraw lets
the native animation settle first; confirmed fixed on device.
This commit is contained in:
pdmarf
2026-08-25 16:52:32 +01:00
parent 2e2f2553ac
commit e897f0a8f5
4 changed files with 9 additions and 5 deletions
+2 -1
View File
@@ -6438,7 +6438,7 @@ async function stopTimer(token, entryId) {
}
// src/plugin.ts
var CURRENT_VERSION = "1.0.44";
var CURRENT_VERSION = "1.0.45";
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=
@@ -6640,6 +6640,7 @@ var TimerToggle = class extends SingletonAction {
if (this.keyDownBusy) {
const title = buttonTitle(ev.payload.settings.projectName || "");
const shouldBeRunning = memRunningActionId === ev.action.id;
await new Promise((resolve) => setTimeout(resolve, 150));
await Promise.all([
ev.action.setState(shouldBeRunning ? 1 : 0),
ev.action.setTitle(shouldBeRunning ? `\u23F1 ${title}` : title)
@@ -1 +1 @@
��¬4•ם�ס"ֶZײXs¨2²�Uמg₪¶�¼~�{z« 6ם§�Lיהµ¢P>״�קp¨ַKeּ¯
696’``w¾)G¶"éoÛ£šAyÍ‹xìØ“ÁÞ ¶á„ÙdG»Cv+t9ãXÅ­ü]M>IÁ¨Í–¼š²ßÁ