Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix some pointed by eslint
  • Loading branch information
asmsuechan committed Oct 13, 2017
commit c33da0cf8e91ff9d349a143d396aa986267954fc
7 changes: 3 additions & 4 deletions browser/main/NoteList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ class NoteList extends React.Component {
let storageKey = params.storageKey
let folderKey = params.folderKey
let storage = data.storageMap.get(storageKey)
if (location.pathname.match(/\/home|\/starred|\/trash/)){
if (location.pathname.match(/\/home|\/starred|\/trash/)) {
return unorderedNotes
}
if (storage === undefined) return []
Expand Down Expand Up @@ -441,14 +441,13 @@ class NoteList extends React.Component {
let note = this.notes[targetIndex]
const label = note.isPinned ? 'Remove pin' : 'Pin to Top'


let menu = new Menu()
menu.append(new MenuItem({
label: label,
click: (e) => this.handlePinToTop(e, uniqueKey)
}))

if (!location.pathname.match(/\/home|\/starred|\/trash/)){
if (!location.pathname.match(/\/home|\/starred|\/trash/)) {
menu.popup()
}
}
Expand Down Expand Up @@ -482,7 +481,7 @@ class NoteList extends React.Component {
return note != null && note.storage + '-' + note.key === uniqueKey
})
let note = this.notes[targetIndex]
note.isPinned = note.isPinned ? false : true
note.isPinned = !note.isPinned

dataApi
.updateNote(note.storage, note.key, note)
Expand Down