1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

add only unsaved filter

This commit is contained in:
Rokt33r
2015-12-28 12:36:43 +09:00
parent 59f83c2432
commit f9539ab50a
5 changed files with 33 additions and 3 deletions

View File

@@ -144,6 +144,10 @@ function remap (state) {
let articles = _articles != null ? _articles.data : []
let modified = _articles != null ? _articles.modified : []
if (state.status.onlyUnsaved) {
articles = modified.map(modifiedArticle => _.findWhere(articles, {key: modifiedArticle.key}))
}
articles.sort((a, b) => {
return new Date(b.updatedAt) - new Date(a.updatedAt)
})