Skip to content

Commit

Permalink
Update selection on new note; closes BoostIO#1507
Browse files Browse the repository at this point in the history
  • Loading branch information
Redsandro committed Feb 12, 2018
1 parent 7b92034 commit 5e07c7b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions browser/main/modals/NewNoteModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,16 @@ class NewNoteModal extends React.Component {
content: ''
})
.then((note) => {
const noteHash = `${note.storage}-${note.key}`
dispatch({
type: 'UPDATE_NOTE',
note: note
})
hashHistory.push({
pathname: location.pathname,
query: {key: note.storage + '-' + note.key}
query: {key: noteHash}
})
ee.emit('list:jump', noteHash)
ee.emit('detail:focus')
this.props.close()
})
Expand Down Expand Up @@ -73,14 +75,16 @@ class NewNoteModal extends React.Component {
}]
})
.then((note) => {
const noteHash = `${note.storage}-${note.key}`
dispatch({
type: 'UPDATE_NOTE',
note: note
})
hashHistory.push({
pathname: location.pathname,
query: {key: note.storage + '-' + note.key}
query: {key: noteHash}
})
ee.emit('list:jump', noteHash)
ee.emit('detail:focus')
this.props.close()
})
Expand Down

0 comments on commit 5e07c7b

Please sign in to comment.