Skip to content

Commit

Permalink
Fix cmd r
Browse files Browse the repository at this point in the history
  • Loading branch information
peniqliotuv committed Feb 27, 2018
1 parent c46e18e commit be93f21
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
22 changes: 11 additions & 11 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const {
session,
ipcMain,
dialog,
globalShortcut,
// globalShortcut,
} = require('electron');
const AutoLaunch = require('auto-launch');
const fetch = require('node-fetch');
Expand Down Expand Up @@ -425,16 +425,16 @@ const initializeApp = () => {
tray = null;
});

globalShortcut.register('Command+R', async () => {
mb.window.webContents.send('command-r');
try {
await refreshAccountData(RobinHoodAPI._accountNumber);
mb.window.webContents.send('data', { data: RobinHoodAPI, preferences: store.get('preferences') });
} catch (e) {
console.error(e);
console.error(e.stack);
}
});
// globalShortcut.register('Command+R', async () => {
// mb.window.webContents.send('command-r');
// try {
// await refreshAccountData(RobinHoodAPI._accountNumber);
// mb.window.webContents.send('data', { data: RobinHoodAPI, preferences: store.get('preferences') });
// } catch (e) {
// console.error(e);
// console.error(e.stack);
// }
// });
};

// This method will be called when Electron has finished
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
"mac": {
"category": "public.app-category.utilities",
"icon": "build/icon-512.png",
"background": "build/background.png",
"target": "dmg"
},
"dmg": {
"background": "build/background.png"
}
},
"devDependencies": {
Expand Down

0 comments on commit be93f21

Please sign in to comment.