mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Change order for pinned notes on /home, /trashed, /searched or /starred
This commit is contained in:
@@ -469,9 +469,10 @@ class NoteList extends React.Component {
|
||||
: config.sortBy === 'ALPHABETICAL'
|
||||
? sortByAlphabetical
|
||||
: sortByUpdatedAt
|
||||
const sortedNotes = this.getNotes().sort(sortFunc)
|
||||
this.notes = notes = this.sortByPin(sortedNotes)
|
||||
.filter((note) => {
|
||||
const sortedNotes = location.pathname.match(/\/home|\/starred|\/trash/)
|
||||
? this.getNotes().sort(sortFunc)
|
||||
: this.sortByPin(this.getNotes().sort(sortFunc))
|
||||
this.notes = notes = sortedNotes.filter((note) => {
|
||||
// this is for the trash box
|
||||
if (note.isTrashed !== true || location.pathname === '/trashed') return true
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user