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,12 +469,13 @@ class NoteList extends React.Component {
|
|||||||
: config.sortBy === 'ALPHABETICAL'
|
: config.sortBy === 'ALPHABETICAL'
|
||||||
? sortByAlphabetical
|
? sortByAlphabetical
|
||||||
: sortByUpdatedAt
|
: sortByUpdatedAt
|
||||||
const sortedNotes = this.getNotes().sort(sortFunc)
|
const sortedNotes = location.pathname.match(/\/home|\/starred|\/trash/)
|
||||||
this.notes = notes = this.sortByPin(sortedNotes)
|
? this.getNotes().sort(sortFunc)
|
||||||
.filter((note) => {
|
: this.sortByPin(this.getNotes().sort(sortFunc))
|
||||||
// this is for the trash box
|
this.notes = notes = sortedNotes.filter((note) => {
|
||||||
if (note.isTrashed !== true || location.pathname === '/trashed') return true
|
// this is for the trash box
|
||||||
})
|
if (note.isTrashed !== true || location.pathname === '/trashed') return true
|
||||||
|
})
|
||||||
|
|
||||||
let noteList = notes
|
let noteList = notes
|
||||||
.map(note => {
|
.map(note => {
|
||||||
|
|||||||
Reference in New Issue
Block a user