mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-08 06:03:03 -04:00
updater: periodically check for updates while open
This commit is contained in:
parent
8c7225d106
commit
59ddf55b99
3 changed files with 65 additions and 33 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue