Skip to content

Commit

Permalink
Merge pull request #720 from asmsuechan/goodby-ctrl-g
Browse files Browse the repository at this point in the history
Goodbye Ctrl-G
  • Loading branch information
asmsuechan committed Jul 22, 2017
2 parents 03bdf0c + 7624251 commit ed7d825
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
25 changes: 0 additions & 25 deletions browser/main/NoteList/index.js
Expand Up @@ -49,10 +49,6 @@ class NoteList extends React.Component {
this.importFromFileHandler = this.importFromFile.bind(this)
this.jumpNoteByHash = this.jumpNoteByHashHandler.bind(this)

this.jumpToTopHandler = () => {
this.jumpToTop()
}

this.state = {
}
}
Expand All @@ -63,8 +59,6 @@ class NoteList extends React.Component {
ee.on('list:prior', this.selectPriorNoteHandler)
ee.on('list:focus', this.focusHandler)
ee.on('list:isMarkdownNote', this.alertIfSnippetHandler)
ee.on('list:top', this.jumpToTopHandler)
ee.on('list:jumpToTop', this.jumpToTopHandler)
ee.on('import:file', this.importFromFileHandler)
ee.on('list:jump', this.jumpNoteByHash)
}
Expand All @@ -86,8 +80,6 @@ class NoteList extends React.Component {
ee.off('list:prior', this.selectPriorNoteHandler)
ee.off('list:focus', this.focusHandler)
ee.off('list:isMarkdownNote', this.alertIfSnippetHandler)
ee.off('list:top', this.jumpToTopHandler)
ee.off('list:jumpToTop', this.jumpToTopHandler)
ee.off('import:file', this.importFromFileHandler)
ee.off('list:jump', this.jumpNoteByHash)
}
Expand Down Expand Up @@ -340,23 +332,6 @@ class NoteList extends React.Component {
}
}

jumpToTop () {
if (this.notes === null || this.notes.length === 0) {
return
}
let { router } = this.context
let { location } = this.props

const targetIndex = 0

router.push({
pathname: location.pathname,
query: {
key: this.notes[targetIndex].storage + '-' + this.notes[targetIndex].key
}
})
}

handleDragStart (e, note) {
const noteData = JSON.stringify(note)
e.dataTransfer.setData('note', noteData)
Expand Down
7 changes: 0 additions & 7 deletions lib/main-menu.js
Expand Up @@ -197,13 +197,6 @@ const view = {
mainWindow.webContents.send('list:prior')
}
},
{
label: 'Jump to Top',
accelerator: 'Control+G',
click () {
mainWindow.webContents.send('list:jumpToTop')
}
},
{
type: 'separator'
},
Expand Down

0 comments on commit ed7d825

Please sign in to comment.