Check updates after 2s

This commit is contained in:
TC
2021-02-06 22:22:49 +01:00
parent 3976d1c862
commit da61621a62

View File

@ -217,7 +217,10 @@ app.on("ready", () => {
}); });
if (!is.dev() && config.get("options.autoUpdates")) { if (!is.dev() && config.get("options.autoUpdates")) {
const updateTimeout = setTimeout(() => {
autoUpdater.checkForUpdatesAndNotify(); autoUpdater.checkForUpdatesAndNotify();
clearTimeout(updateTimeout);
}, 2000);
autoUpdater.on("update-available", () => { autoUpdater.on("update-available", () => {
const downloadLink = const downloadLink =
"https://github.com/th-ch/youtube-music/releases/latest"; "https://github.com/th-ch/youtube-music/releases/latest";