Skip to content

Commit

Permalink
Reverse notes after filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexGarrity authored and Rokt33r committed Feb 24, 2020
1 parent d706a53 commit afbe439
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion browser/main/NoteList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1144,12 +1144,12 @@ class NoteList extends React.Component {
const sortedNotes = location.pathname.match(/\/starred|\/trash/)
? this.getNotes().sort(sortFunc)
: this.sortByPin(this.getNotes().sort(sortFunc))
if (sortDir === 'DESCENDING') sortedNotes.reverse()
this.notes = notes = sortedNotes.filter(note => {
// this is for the trash box
if (note.isTrashed !== true || location.pathname === '/trashed')
return true
})
if (sortDir === 'DESCENDING') this.notes.reverse()

moment.updateLocale('en', {
relativeTime: {
Expand Down

0 comments on commit afbe439

Please sign in to comment.