Do not log if internet is connected

This commit is contained in:
Agampreet Singh
2023-06-11 21:49:09 +05:30
parent 0e02c64999
commit 5b4db16b64

View File

@@ -328,24 +328,20 @@ app.on("activate", () => {
}); });
app.on("ready", function () { app.on("ready", function () {
checkInternetConnected() checkInternetConnected().catch(() => {
.then(() => { const options = {
console.log("You are connected to the internet!"); type: "warning",
}) buttons: ["Ok"],
.catch(() => { defaultId: 2,
const options = { title: "Warning",
type: "warning", message: "You appear to be offline!",
buttons: ["Ok"], detail:
defaultId: 2, "Please check your Internet Connectivity. This app cannot run without an Internet Connection!",
title: "Warning", };
message: "You appear to be offline!", dialog.showMessageBox(null, options, (response) => {
detail: console.log(response);
"Please check your Internet Connectivity. This app cannot run without an Internet Connection!",
};
dialog.showMessageBox(null, options, (response) => {
console.log(response);
});
}); });
});
autoUpdater.checkForUpdatesAndNotify(); autoUpdater.checkForUpdatesAndNotify();
if (getValue("discordrpcstatus") === "true") { if (getValue("discordrpcstatus") === "true") {
loginToRPC(); loginToRPC();