Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Fix reload/stop buttons
Browse files Browse the repository at this point in the history
Auditors: @bbondy
  • Loading branch information
diracdeltas committed Dec 23, 2015
1 parent 5e50b9a commit 33bf011
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/components/navigationBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const UrlBar = require('./urlBar')
const AppActions = require('../actions/appActions')
const {isSiteInList} = require('../state/siteUtil')
const SiteTags = require('../constants/siteTags')
const remote = global.require('electron').remote
const messages = require('../constants/messages')

class NavigationBar extends ImmutableComponent {

Expand All @@ -32,11 +34,11 @@ class NavigationBar extends ImmutableComponent {
}

onReload () {
process.emit('reload-active-frame')
remote.getCurrentWebContents().send(messages.SHORTCUT_ACTIVE_FRAME_RELOAD)
}

onStop () {
process.emit('stop-active-frame')
remote.getCurrentWebContents().send(messages.SHORTCUT_ACTIVE_FRAME_STOP)
}

get bookmarked () {
Expand Down

1 comment on commit 33bf011

@bbondy
Copy link
Member

@bbondy bbondy commented on 33bf011 Dec 23, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fairly sure using remote like this just asks the main process to emit the message, so it does this extra 2 way IPC than would be possible just doing it in the current process and avoiding the IPC. Happy to have it working though either way :)

Please sign in to comment.