feat: allow disabling updates check (#155)
Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
parent
e6cc11fc0e
commit
4b8f374856
3 changed files with 5 additions and 2 deletions
|
@ -47,7 +47,8 @@ export default function SettingsUi() {
|
|||
"openLinksWithElectron",
|
||||
"Open Links in app (experimental)",
|
||||
"Opens links in a new Vesktop window instead of your web browser"
|
||||
]
|
||||
],
|
||||
["checkUpdates", "Check for updates", "Automatically check for Vesktop updates", true]
|
||||
];
|
||||
|
||||
const switches = allSwitches.filter(isTruthy);
|
||||
|
|
1
src/shared/settings.d.ts
vendored
1
src/shared/settings.d.ts
vendored
|
@ -24,6 +24,7 @@ export interface Settings {
|
|||
windowBounds?: Rectangle;
|
||||
disableMinSize?: boolean;
|
||||
|
||||
checkUpdates?: boolean;
|
||||
skippedUpdate?: string;
|
||||
firstLaunch?: boolean;
|
||||
|
||||
|
|
|
@ -77,7 +77,8 @@ function isOutdated(oldVersion: string, newVersion: string) {
|
|||
}
|
||||
|
||||
export async function checkUpdates() {
|
||||
// if (IS_DEV) return;
|
||||
if (Settings.store.checkUpdates === false) return;
|
||||
|
||||
try {
|
||||
const raw = await githubGet("/repos/Vencord/Vesktop/releases/latest");
|
||||
const data = JSON.parse(raw.toString("utf-8")) as ReleaseData;
|
||||
|
|
Loading…
Reference in a new issue