aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-10-05 17:09:37 +0200
committerVendicated <vendicated@riseup.net>2022-10-05 17:09:37 +0200
commit25fcc528eaf154bef3aa6eff3bb842f17fe28163 (patch)
treecb537f7279c24deae442cb79e60e6c53ac7d0f24 /src/utils
parent443978929b04630014f16bfb127013ec7c74cb6b (diff)
downloadVencord-25fcc528eaf154bef3aa6eff3bb842f17fe28163.tar.gz
Vencord-25fcc528eaf154bef3aa6eff3bb842f17fe28163.tar.bz2
Vencord-25fcc528eaf154bef3aa6eff3bb842f17fe28163.zip
Updater: Inform about more recent commits
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/updater.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/utils/updater.ts b/src/utils/updater.ts
index 3b1cfa7..f02af3a 100644
--- a/src/utils/updater.ts
+++ b/src/utils/updater.ts
@@ -5,6 +5,7 @@ import gitHash from 'git-hash';
export const UpdateLogger = new Logger("Updater", "white");
export let isOutdated = false;
+export let isNewer = false;
export let updateError: any;
export let changes: Record<"hash" | "author" | "message", string>[];
@@ -20,8 +21,8 @@ async function Unwrap<T>(p: Promise<IpcRes<T>>) {
export async function checkForUpdates() {
changes = await Unwrap(VencordNative.ipc.invoke<IpcRes<typeof changes>>(IpcEvents.GET_UPDATES));
if (changes.some(c => c.hash === gitHash)) {
- // git log NEWER...OLDER works as well. This means it will return the more recent local commits if the
- changes = [];
+ isNewer = true;
+ return (isOutdated = false);
}
return (isOutdated = changes.length > 0);
}