mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
fix: return created groups
This commit is contained in:
@@ -63,9 +63,11 @@ class Database {
|
|||||||
note => months[new Date(note.dateCreated).getMonth()]
|
note => months[new Date(note.dateCreated).getMonth()]
|
||||||
);
|
);
|
||||||
case "week":
|
case "week":
|
||||||
groupBy(notes, note => getWeekGroupFromTimestamp(note.dateCreated));
|
return groupBy(notes, note =>
|
||||||
|
getWeekGroupFromTimestamp(note.dateCreated)
|
||||||
|
);
|
||||||
case "year":
|
case "year":
|
||||||
groupBy(
|
return groupBy(
|
||||||
notes,
|
notes,
|
||||||
note => months[new Date(note.dateCreated).getFullYear()]
|
note => months[new Date(note.dateCreated).getFullYear()]
|
||||||
);
|
);
|
||||||
@@ -74,7 +76,7 @@ class Database {
|
|||||||
recent: getLastWeekTimestamp(7),
|
recent: getLastWeekTimestamp(7),
|
||||||
lastWeek: getLastWeekTimestamp(7) - 604800000 //seven day timestamp value
|
lastWeek: getLastWeekTimestamp(7) - 604800000 //seven day timestamp value
|
||||||
};
|
};
|
||||||
groupBy(notes, note =>
|
return groupBy(notes, note =>
|
||||||
note.dateCreated >= timestamps.recent
|
note.dateCreated >= timestamps.recent
|
||||||
? "Recent"
|
? "Recent"
|
||||||
: note.dateCreated >= timestamps.lastWeek
|
: note.dateCreated >= timestamps.lastWeek
|
||||||
|
|||||||
Reference in New Issue
Block a user