Skip to content

Commit

Permalink
show info box if blank window for initial 30s
Browse files Browse the repository at this point in the history
  • Loading branch information
mienaiyami committed Sep 25, 2023
1 parent 925bb43 commit d687e86
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,14 +422,27 @@ const registerListener = () => {
});
});
}

const errorCheckTimeout = setTimeout(() => {
app.isPackaged &&
dialog
.showMessageBox({
type: "info",
message:
"If you are seeing blank window then check the github page for new version or create an issue if no new version is available.",
buttons: ["Ok", "Home Page"],
})
.then((e) => {
if (e.response === 1) shell.openExternal("https://github.com/mienaiyami/yomikiru");
});
}, 1000 * 30);
ipcMain.on("checkForUpdate:response", (e, res, windowId, skipMinor, autoDownload) => {
if (res) {
checkForUpdate(windowId, skipMinor, false, autoDownload);
setInterval(() => {
checkForUpdate(windowId, skipMinor, false, autoDownload);
}, 1000 * 60 * 60 * 1);
}
clearTimeout(errorCheckTimeout);
});
ipcMain.on("checkForUpdate", (e, windowId, promptAfterCheck = false) => {
checkForUpdate(windowId, false, promptAfterCheck);
Expand Down

0 comments on commit d687e86

Please sign in to comment.