Skip to content

Commit ad865a2

Browse files
committed
fix: Déclaration du TrayIcon en global pour éviter les problèmes de GC + update electron
1 parent c822e0f commit ad865a2

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

build.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.\node_modules\.bin\electron-packager . "GoogleTasksDesktop" --platform=win32 --arch=x64 --version=1.4.1 --out=./build --overwrite --icon=./src/images/shortcut.ico --win32metadata.ProductName="GoogleTasks Desktop" --win32metadata.CompanyName="Wixiweb" --app-copyright="Wixiweb" --asar
1+
.\node_modules\.bin\electron-packager . "GoogleTasksDesktop" --platform=win32 --arch=x64 --version=1.4.6 --out=./build --overwrite --icon=./src/images/shortcut.ico --win32metadata.ProductName="GoogleTasks Desktop" --win32metadata.CompanyName="Wixiweb" --app-copyright="Wixiweb" --asar

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "googletasks-desktop",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"description": "A desktop app for Google Tasks, using Electron like container",
55
"main": "src/main.js",
66
"scripts": {

src/main.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const shell = electron.shell;
2020
// Keep a global reference of the window object, if you don't, the window will
2121
// be closed automatically when the JavaScript object is garbage collected.
2222
let mainWindow;
23+
let appIcon;
2324

2425
function createWindow() {
2526

@@ -43,7 +44,7 @@ function createWindow() {
4344
// and load the index.html of the app.
4445
mainWindow.loadURL(`file://${__dirname}/views/index.html`);
4546

46-
const appIcon = new Tray(path.join(__dirname, 'images', 'trayicon.png'));
47+
appIcon = new Tray(path.join(__dirname, 'images', 'trayicon.png'));
4748
appIcon.setToolTip('GoogleTasks Desktop by Wixiweb');
4849
appIcon.on('click', function () {
4950
if(mainWindow.isVisible()){

0 commit comments

Comments
 (0)