Improved dashboard

This commit is contained in:
Eduard Urbach 2017-06-27 00:06:56 +02:00
parent e7d914f223
commit 8c631f4e26
2 changed files with 2 additions and 5 deletions

View File

@ -36,10 +36,7 @@ func dashboard(ctx *aero.Context) string {
flow.Parallel(func() {
posts, err = arn.AllPostsSlice()
arn.SortPostsLatestFirst(posts)
if len(posts) > maxPosts {
posts = posts[:maxPosts]
}
posts = arn.FilterPostsWithUniqueThreads(posts, maxPosts)
}, func() {
followIDList = user.Following
userList, err = arn.DB.GetMany("User", followIDList)

View File

@ -15,7 +15,7 @@ component Dashboard(posts []*arn.Post, following []*arn.User)
h3.widget-title Forums
each post in posts
a.widget-element.ajax(href=post.Link())
a.widget-element.ajax(href=post.Thread().Link())
.widget-element-text
Icon(arn.GetForumIcon(post.Thread().Tags[0]))
span= post.Thread().Title