Update the "lastRunningState" in case update was triggered outside of app (#478)

This commit is contained in:
schroda
2023-11-25 18:20:49 +01:00
committed by GitHub
parent 47b077cbf5
commit c6cc7c14dd

View File

@@ -52,6 +52,10 @@ export function UpdateChecker({ handleFinishedUpdate }: { handleFinishedUpdate?:
); );
useEffect(() => { useEffect(() => {
if (!lastRunningState && status?.isRunning) {
lastRunningState = true;
}
const isUpdateFinished = lastRunningState && progress === 100; const isUpdateFinished = lastRunningState && progress === 100;
if (!isUpdateFinished) { if (!isUpdateFinished) {
return; return;