Skip to content

Commit

Permalink
feat: allow disabling updates check (#155)
Browse files Browse the repository at this point in the history
Co-authored-by: V <[email protected]>
  • Loading branch information
ryanccn and Vendicated authored Oct 22, 2023
1 parent e6cc11f commit 4b8f374
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/renderer/components/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/shared/settings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export interface Settings {
windowBounds?: Rectangle;
disableMinSize?: boolean;

checkUpdates?: boolean;
skippedUpdate?: string;
firstLaunch?: boolean;

Expand Down
3 changes: 2 additions & 1 deletion src/updater/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4b8f374

Please sign in to comment.