v1.0.32: re-assert button state after setSettings resets it

setSettings() causes Stream Deck to reset the button visual back to
its default state (state 0). The optimistic setState(1) was correct
but got overridden. Now setState(1) is called again after setSettings
completes to ensure the button stays green.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
pdmarf
2026-04-24 09:01:55 +01:00
co-authored by Claude Sonnet 4.6
parent a233cfc4fd
commit e3a19234a9
6 changed files with 8 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.31";
var CURRENT_VERSION = "1.0.32";
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=
@@ -6648,6 +6648,7 @@ var TimerToggle = class extends SingletonAction {
await ev.action.setSettings(started);
this.settingsCache.set(ev.action.id, started);
await setRunningEntry(entryId);
await Promise.all([ev.action.setState(1), ev.action.setTitle(`\u23F1 ${title}`)]);
}
} catch (err) {
plugin_default.logger.error("Timer toggle failed:", err);
@@ -1 +1 @@
vçXCá¹kf*j”˜vèk𮂿 0OZj Yú»2Öˆ=%Ö/ÚVêØÅe[<ËÃ0õ7_÷ÊñÄë
ôÙ"Ë4-Ħ8peŒ—Oc"ÜuÉ»SÀ�>gé‡-ŸÁ#—&�Óò¿q‰¡N0Åý”ÒvZ¶ÍÎI²�ß