1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

sort by time & add FolderMark

This commit is contained in:
Rokt33r
2015-10-17 16:46:10 +09:00
parent 2a339a2935
commit 1df4ed0fe9
5 changed files with 60 additions and 7 deletions

View File

@@ -69,6 +69,9 @@ function remap (state) {
let articles = state.articles['team-' + activeUser.id]
if (articles == null) articles = []
articles.sort((a, b) => {
return new Date(b.updatedAt) - new Date(a.updatedAt)
})
let activeArticle = findWhere(articles, {key: status.articleKey})
if (activeArticle == null) activeArticle = articles[0]