1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-15 02:36:36 +00:00

Reverse notes after filtering

This commit is contained in:
Alex Garrity
2020-02-17 13:54:47 +00:00
committed by Junyoung Choi
parent d706a5375c
commit afbe43965e

View File

@@ -1144,12 +1144,12 @@ class NoteList extends React.Component {
const sortedNotes = location.pathname.match(/\/starred|\/trash/) const sortedNotes = location.pathname.match(/\/starred|\/trash/)
? this.getNotes().sort(sortFunc) ? this.getNotes().sort(sortFunc)
: this.sortByPin(this.getNotes().sort(sortFunc)) : this.sortByPin(this.getNotes().sort(sortFunc))
if (sortDir === 'DESCENDING') sortedNotes.reverse()
this.notes = notes = sortedNotes.filter(note => { this.notes = notes = sortedNotes.filter(note => {
// this is for the trash box // this is for the trash box
if (note.isTrashed !== true || location.pathname === '/trashed') if (note.isTrashed !== true || location.pathname === '/trashed')
return true return true
}) })
if (sortDir === 'DESCENDING') this.notes.reverse()
moment.updateLocale('en', { moment.updateLocale('en', {
relativeTime: { relativeTime: {