This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tallynote",
|
||||
"version": "1.2.1",
|
||||
"version": "1.2.2",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"packageManager": "pnpm@9.0.6",
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user