First check for app updates on the backend then fetch updates

This commit is contained in:
Johannes Zellner
2025-07-18 18:13:35 +02:00
parent 7e0803c4b4
commit 8c858c6b1e
+5 -9
View File
@@ -36,20 +36,16 @@ async function onAutoUpdatesEnabledChange(value) {
autoUpdatesEnabledBusy.value = false;
}
async function refreshUpdates() {
const [error, result] = await updaterModel.checkAppUpdate(props.app.id);
if (error) return console.error(error);
update.value = result;
}
async function onCheck() {
busyCheck.value = true;
const [error] = await appsModel.checkUpdate(props.app.id);
const [checkError] = await updaterModel.checkAppUpdate(props.app.id);
if (checkError) return console.error(error);
const [error, result] = await appsModel.checkUpdate(props.app.id);
if (error) return console.error(error);
await refreshUpdates();
update.value = result;
busyCheck.value = false;
}