Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
Fix Tray icon unresponsiveness (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
migmartri committed Jul 23, 2018
1 parent 5ec9025 commit db12e5a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/app/package.json
@@ -1,7 +1,7 @@
{
"name": "slacktronic",
"productName": "Slacktronic",
"version": "0.0.9",
"version": "0.1.0",
"description": "Connect your Slack workspace to Arduino",
"main": "./main.prod.js",
"author": {
Expand Down
5 changes: 4 additions & 1 deletion client/app/tray-menu.js
Expand Up @@ -2,6 +2,9 @@
import { app, BrowserWindow, Tray, nativeImage, Menu } from 'electron';
import path from 'path';

// Keep a global reference of the tray icon to avoid problems with garbage collector
let tray: ?Tray = null;

export default class TrayMenuBuilder {
mainWindow: BrowserWindow;

Expand Down Expand Up @@ -30,7 +33,7 @@ export default class TrayMenuBuilder {
}
]);

const tray = new Tray(nimage);
tray = new Tray(nimage);
tray.setContextMenu(contextMenu);

this.mainWindow.on('close', (event) => {
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
@@ -1,7 +1,7 @@
{
"name": "slacktronic",
"productName": "Slacktronic",
"version": "0.0.9",
"version": "0.1.0",
"description": "Connect your Slack workspace to Arduino",
"scripts": {
"build": "concurrently \"npm run build-main\" \"npm run build-renderer\"",
Expand Down

0 comments on commit db12e5a

Please sign in to comment.