Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xland committed Dec 17, 2023
1 parent c9f6c67 commit 68ff697
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ class Main {
ipcMain.handle("setOpenAtLogin", (e, flag: boolean) => {
app.setLoginItemSettings({ openAtLogin: flag });
});
ipcMain.handle("relaunch",()=>{
app.relaunch();
app.quit();
})
ipcMain.handle("activeSubWindow", (e) => {
let wins = BrowserWindow.getAllWindows();
for (let item of wins) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "calendar",
"version": "1.0.1",
"version": "1.0.2",
"description": "A easy to use calendar desktop software",
"main": "main.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion render/DataMonth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ class DataMonth {
let span = end.getTime() - this.curDate.getTime()
clearTimeout(this.idTimerToTomarrow);
this.idTimerToTomarrow = setTimeout(()=>{
window.location.reload()
let { ipcRenderer } = require("electron");
ipcRenderer.invoke("relaunch")
},span)
}
async init() {
Expand Down

0 comments on commit 68ff697

Please sign in to comment.