mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
feat: do not get pinned notes in group
This commit is contained in:
@@ -57,13 +57,17 @@ class Database {
|
|||||||
return tfun.filter(".favorite = true")(extractValues(this.notes));
|
return tfun.filter(".favorite = true")(extractValues(this.notes));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getPinned() {
|
||||||
|
return tfun.filter(".pinned = true")(extractValues(this.notes));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} by One from 'abc', 'month', 'year' or 'week'. Leave it empty for default grouping.
|
* @param {string} by One from 'abc', 'month', 'year' or 'week'. Leave it empty for default grouping.
|
||||||
* @param {boolean} special Should only be used in the React app.
|
* @param {boolean} special Should only be used in the React app.
|
||||||
*/
|
*/
|
||||||
groupNotes(by, special = false) {
|
groupNotes(by, special = false) {
|
||||||
//TODO add tests
|
//TODO add tests
|
||||||
let notes = this.getNotes();
|
let notes = tfun.filter(".pinned = false")(extractValues(this.getNotes()));
|
||||||
switch (by) {
|
switch (by) {
|
||||||
case "abc":
|
case "abc":
|
||||||
return groupBy(
|
return groupBy(
|
||||||
|
|||||||
Reference in New Issue
Block a user