1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-15 02:36:36 +00:00

add special link handling

This commit is contained in:
AWolf81
2020-02-19 22:53:10 +01:00
committed by Junyoung Choi
parent ccd0355d0b
commit 2695f62f3e
2 changed files with 116 additions and 19 deletions

View File

@@ -181,6 +181,7 @@ class Main extends React.Component {
'menubar:togglemenubar',
this.toggleMenuBarVisible.bind(this)
)
eventEmitter.on('dispatch:push', this.changeRoutePush.bind(this))
}
componentWillUnmount() {
@@ -189,6 +190,12 @@ class Main extends React.Component {
'menubar:togglemenubar',
this.toggleMenuBarVisible.bind(this)
)
eventEmitter.off('dispatch:push', this.changeRoutePush.bind(this))
}
changeRoutePush(event, destination) {
const { dispatch } = this.props
dispatch(push(destination))
}
toggleMenuBarVisible() {