v1.0.35: re-assert setState(0) after setSettings on stop path
setSettings() resets the visual state in both directions. The start path already re-asserted setState(1) after setSettings. The stop path was missing the equivalent setState(0), leaving the button green. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6438,7 +6438,7 @@ async function stopTimer(token, entryId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// src/plugin.ts
|
// src/plugin.ts
|
||||||
var CURRENT_VERSION = "1.0.34";
|
var CURRENT_VERSION = "1.0.35";
|
||||||
var GITEA_BASE = "https://gitea.pdmarf.co.uk/pdm/stream_deck_notion_timer/raw/branch/stable-rebuild";
|
var GITEA_BASE = "https://gitea.pdmarf.co.uk/pdm/stream_deck_notion_timer/raw/branch/stable-rebuild";
|
||||||
var SIGNING_PUBLIC_KEY = `-----BEGIN PUBLIC KEY-----
|
var SIGNING_PUBLIC_KEY = `-----BEGIN PUBLIC KEY-----
|
||||||
MCowBQYDK2VwAyEAN7ko8TUpuPzPAJuKAZCRjV0c4ZSlou5d9pUAF6o12b4=
|
MCowBQYDK2VwAyEAN7ko8TUpuPzPAJuKAZCRjV0c4ZSlou5d9pUAF6o12b4=
|
||||||
@@ -6626,6 +6626,7 @@ var TimerToggle = class extends SingletonAction {
|
|||||||
await ev.action.setSettings(stopped);
|
await ev.action.setSettings(stopped);
|
||||||
this.settingsCache.set(ev.action.id, stopped);
|
this.settingsCache.set(ev.action.id, stopped);
|
||||||
await setRunningEntry(null);
|
await setRunningEntry(null);
|
||||||
|
await Promise.all([ev.action.setState(0), ev.action.setTitle(title)]);
|
||||||
} else {
|
} else {
|
||||||
const prevEntryId = await getRunningEntryId();
|
const prevEntryId = await getRunningEntryId();
|
||||||
if (prevEntryId) {
|
if (prevEntryId) {
|
||||||
|
|||||||
Binary file not shown.
@@ -2,7 +2,7 @@
|
|||||||
"Author": "Pete Marfleet",
|
"Author": "Pete Marfleet",
|
||||||
"Description": "Toggle Notion time tracking for a project with a single button press.",
|
"Description": "Toggle Notion time tracking for a project with a single button press.",
|
||||||
"Name": "Notion Timer",
|
"Name": "Notion Timer",
|
||||||
"Version": "1.0.34",
|
"Version": "1.0.35",
|
||||||
"SDKVersion": 2,
|
"SDKVersion": 2,
|
||||||
"Software": { "MinimumVersion": "5.0" },
|
"Software": { "MinimumVersion": "5.0" },
|
||||||
"OS": [{ "Platform": "mac", "MinimumVersion": "10.11" }],
|
"OS": [{ "Platform": "mac", "MinimumVersion": "10.11" }],
|
||||||
|
|||||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
|||||||
const CURRENT_VERSION = "1.0.34";
|
const CURRENT_VERSION = "1.0.35";
|
||||||
const GITEA_BASE = "https://gitea.pdmarf.co.uk/pdm/stream_deck_notion_timer/raw/branch/stable-rebuild";
|
const GITEA_BASE = "https://gitea.pdmarf.co.uk/pdm/stream_deck_notion_timer/raw/branch/stable-rebuild";
|
||||||
const SIGNING_PUBLIC_KEY = `-----BEGIN PUBLIC KEY-----
|
const SIGNING_PUBLIC_KEY = `-----BEGIN PUBLIC KEY-----
|
||||||
MCowBQYDK2VwAyEAN7ko8TUpuPzPAJuKAZCRjV0c4ZSlou5d9pUAF6o12b4=
|
MCowBQYDK2VwAyEAN7ko8TUpuPzPAJuKAZCRjV0c4ZSlou5d9pUAF6o12b4=
|
||||||
@@ -238,6 +238,8 @@ class TimerToggle extends SingletonAction<TimerSettings> {
|
|||||||
await ev.action.setSettings(stopped);
|
await ev.action.setSettings(stopped);
|
||||||
this.settingsCache.set(ev.action.id, stopped);
|
this.settingsCache.set(ev.action.id, stopped);
|
||||||
await setRunningEntry(null);
|
await setRunningEntry(null);
|
||||||
|
// Re-assert after setSettings resets visual state
|
||||||
|
await Promise.all([ev.action.setState(0), ev.action.setTitle(title)]);
|
||||||
} else {
|
} else {
|
||||||
const prevEntryId = await getRunningEntryId();
|
const prevEntryId = await getRunningEntryId();
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{ "version": "1.0.34" }
|
{ "version": "1.0.35" }
|
||||||
|
|||||||
Reference in New Issue
Block a user