fix: prevent duplicate update submissions
TallyNote release / linux-x64 (push) Successful in 6m47s

This commit is contained in:
Qiufeng
2026-09-05 10:08:49 +08:00
parent 3a9f809f46
commit 4c71861813
2 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "tallynote",
"version": "1.2.1",
"version": "1.2.2",
"private": true,
"type": "module",
"packageManager": "pnpm@9.0.6",
+6 -2
View File
@@ -450,7 +450,8 @@ export default function UpdatePage({
// Start download action
const startDownload = async () => {
if (!latest) return;
if (!latest || actionInFlight.current || hasActiveJob || canApply) return;
actionInFlight.current = true;
setActionBusy(true);
setError("");
setModalError("");
@@ -469,12 +470,14 @@ export default function UpdatePage({
notify?.(msg, "error");
} finally {
setActionBusy(false);
actionInFlight.current = false;
}
};
// Start apply action
const startApply = async () => {
if (!latest) return;
if (!latest || !job || job.status !== "staged" || job.operation !== "download" || actionInFlight.current) return;
actionInFlight.current = true;
setActionBusy(true);
setError("");
setModalError("");
@@ -492,6 +495,7 @@ export default function UpdatePage({
notify?.(msg, "error");
} finally {
setActionBusy(false);
actionInFlight.current = false;
}
};