Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: move pinned notebooks to the top

thecodrr7cda89229eb4
diff --git a/packages/core/collections/notebooks.js b/packages/core/collections/notebooks.js
index 131d6e4b1..163e5b8e1 100644
--- a/packages/core/collections/notebooks.js
+++ b/packages/core/collections/notebooks.js
@@ -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() {