mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-21 05:59:35 +01:00
fix: move pinned notebooks to the top
This commit is contained in:
@@ -3,6 +3,8 @@ import fuzzysearch from "fuzzysearch";
|
||||
import Notebook from "../models/notebook";
|
||||
import Notes from "./notes";
|
||||
import Trash from "./trash";
|
||||
import sort from "fast-sort";
|
||||
|
||||
var tfun = require("transfun/transfun.js").tfun;
|
||||
if (!tfun) {
|
||||
tfun = global.tfun;
|
||||
@@ -61,7 +63,7 @@ export default class Notebooks {
|
||||
}
|
||||
|
||||
get all() {
|
||||
return this._collection.getAllItems();
|
||||
return sort(this._collection.getAllItems()).desc(t => t.pinned);
|
||||
}
|
||||
|
||||
get pinned() {
|
||||
|
||||
Reference in New Issue
Block a user