updater: periodically check for updates while open

This commit is contained in:
Vendicated 2025-05-13 22:39:56 +02:00
parent 8c7225d106
commit 59ddf55b99
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18
3 changed files with 65 additions and 33 deletions

View file

@ -39,10 +39,15 @@ async function Unwrap<T>(p: Promise<IpcRes<T>>) {
export async function checkForUpdates() {
changes = await Unwrap(VencordNative.updater.getUpdates());
if (changes.some(c => c.hash === gitHash)) {
isNewer = true;
return (isOutdated = false);
// we only want to check this for the git updater, not the http updater
if (!IS_STANDALONE) {
if (changes.some(c => c.hash === gitHash)) {
isNewer = true;
return (isOutdated = false);
}
}
return (isOutdated = changes.length > 0);
}