v1.0.43: self-heal stale button icon when blocked by the keyDown lock
When a keyDown is blocked by the v1.0.42 lock, redraw that button to match memRunningActionId instead of leaving whatever it was already showing. This closes the follow-on issue found while testing 1.0.42: a button's key image can go stale if its Notion timer was ever stopped/started outside the plugin (e.g. a manual Notion edit), and a blocked press was leaving that stale image in place — misleading the user into thinking a timer was running when it wasn't, which then caused a *real* unintended timer start on the next press.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
HeÒ¾à�¡21™ßC'Ý—ÿ9ƒx¤,$2&úöö¡rÅYËb’L¸ËeìÉ.ËQ:¶þõub;B™¢&
|
||||
íü„«ÚƒJºh^©A׊[ÈÍ
|
||||
Ìg»Jµmã
|
||||
SÙ¹mš']ï´y�j$¬<ÎÇÙÃ5ef«?eó=™y–
|
||||
Reference in New Issue
Block a user