Skip to content

Commit 7dea463

Browse files
committed
Fixed close to tray on startup
1 parent 18ce9d8 commit 7dea463

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/assets/js/script.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import {setCookie} from "./tools.js";
2+
13
const {ipcRenderer, shell} = require('electron');
24

35
import * as tools from "./tools.js";
@@ -22,6 +24,10 @@ window.onload = async () => {
2224
if (tools.getCookie("saveLocation")) location.value = tools.getCookie("lastLocation");
2325
if (tools.getCookie("cache") !== null) tools.loadAllData(location);
2426

27+
if (tools.getCookie("closeToTray")) {
28+
ipcRenderer.send("enableCloseToTray");
29+
}
30+
2531
const notification = document.getElementById("updateNotification");
2632
const message = notification.querySelector(".message");
2733
const restartButton = notification.querySelector('.restart-button');

0 commit comments

Comments
 (0)