First check for app updates on the backend then fetch updates
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user