Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.

Commit f61daa6

Browse files
committed
Release 1.1.7
* Store tray icon in a variable cause garbage collection be dumb
1 parent 3930db0 commit f61daa6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const { autoUpdater } = require('electron-updater');
1010
let connected = false;
1111
let minimized = false;
1212
let electronWindow;
13+
let tray;
1314
let location = 'Jezero Crater';
1415

1516
// App
@@ -51,10 +52,8 @@ function createWindow() {
5152
}
5253

5354
function createTray() {
54-
const iconPath = app.isPackaged
55-
? path.join(__dirname, '../app.asar/percy.png')
56-
: path.join(__dirname, 'percy.png');
57-
const appIcon = new Tray(iconPath);
55+
const icon = path.join(__dirname, 'percy.png');
56+
const appIcon = new Tray(icon);
5857
const contextMenu = Menu.buildFromTemplate([
5958
{
6059
label: 'Show',
@@ -81,6 +80,7 @@ function createTray() {
8180
});
8281
appIcon.setToolTip('Perseverance RPC');
8382
appIcon.setContextMenu(contextMenu);
83+
tray = appIcon;
8484
}
8585

8686
Menu.setApplicationMenu(Menu.buildFromTemplate([

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "perseverancerpc",
3-
"version": "1.1.6",
3+
"version": "1.1.7",
44
"description": "A quick discord RPC application for tracking perseverance landing.",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)