Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions browser/main/NoteList/index.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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