feat: do not get pinned notes in group

This commit is contained in:
thecodrr
2020-01-03 15:24:54 +05:00
parent 3a9746ab54
commit 8a0a0c8e88

View File

@@ -57,13 +57,17 @@ class Database {
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 {boolean} special Should only be used in the React app.
*/
groupNotes(by, special = false) {
//TODO add tests
let notes = this.getNotes();
let notes = tfun.filter(".pinned = false")(extractValues(this.getNotes()));
switch (by) {
case "abc":
return groupBy(