Skip to content

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

core: do not include trashed notes in total notebook notes

Abdullah Atta628d3bd9ff1d
diff --git a/packages/core/models/notebook.js b/packages/core/models/notebook.js
index 45e717559..1419b9f65 100644
--- a/packages/core/models/notebook.js
+++ b/packages/core/models/notebook.js
@@ -35,7 +35,7 @@ export default class Notebook {
for (const topic of this._notebook.topics) {
count += this._db.notes.topicReferences.count(topic.id);
}
- return count + this._db.relations.count(this._notebook, "note");
+ return count + this._db.relations.from(this._notebook, "note").length;
}
get title() {