v1.0.47: auto-refresh version display in property inspector after update

The version number shown in the PI only updates via the 'projects' push,
which only fires from onPropertyInspectorDidAppear (i.e. when a
different button is clicked, forcing the PI to re-appear). After
'Check for Updates' completes and the plugin process restarts, an
already-open PI kept showing the pre-update version indefinitely.

Two changes: send a final 'Updated to vX — restarting…' status right
before process.exit(0) so the update message doesn't hang on
'Updating…', and push sendProjectsToPI() once on every plugin startup
(after streamDeck.connect()) so a PI that survived the restart gets
the new version immediately instead of waiting for an unrelated button
click.
This commit is contained in:
pdmarf
2026-09-02 11:24:30 +01:00
parent 5b3ba8186c
commit 3a033679c8
5 changed files with 15 additions and 4 deletions
+3 -1
View File
@@ -6438,7 +6438,7 @@ async function stopTimer(token, entryId) {
}
// src/plugin.ts
var CURRENT_VERSION = "1.0.46";
var CURRENT_VERSION = "1.0.47";
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=
@@ -6512,6 +6512,7 @@ async function checkForUpdates(sendStatus) {
}
fs3.writeFileSync(__filename, newCode);
plugin_default.logger.info(`Updated to ${version}, restarting\u2026`);
sendStatus?.(`Updated to v${version} \u2014 restarting\u2026`);
process.exit(0);
} catch (err) {
const msg = err instanceof Error ? err.message : String(err);
@@ -6734,6 +6735,7 @@ plugin_default.ui.onSendToPlugin(async (ev) => {
}
});
plugin_default.connect();
sendProjectsToPI();
setTimeout(() => checkForUpdates(), 1e4);
/*! Bundled license information:
@@ -1 +1,3 @@
%тC╧K$Яh╜╦Oвы~┘▒cc╗'cwMА▐╦Чю⌡╦\чщAД╗▐ty"0|иiНbRЖ╩/нЕ└/║
·μΕ8ρΣ␍‡αΨ9QΓΐ>¥,™d4όϋ^ε'Ι0'}Α`
H"�U·ΌX
^|~’^―£+¦υ§p