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() { flow.Parallel(func() {
posts, err = arn.AllPostsSlice() posts, err = arn.AllPostsSlice()
arn.SortPostsLatestFirst(posts) arn.SortPostsLatestFirst(posts)
posts = arn.FilterPostsWithUniqueThreads(posts, maxPosts)
if len(posts) > maxPosts {
posts = posts[:maxPosts]
}
}, func() { }, func() {
followIDList = user.Following followIDList = user.Following
userList, err = arn.DB.GetMany("User", followIDList) 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 h3.widget-title Forums
each post in posts each post in posts
a.widget-element.ajax(href=post.Link()) a.widget-element.ajax(href=post.Thread().Link())
.widget-element-text .widget-element-text
Icon(arn.GetForumIcon(post.Thread().Tags[0])) Icon(arn.GetForumIcon(post.Thread().Tags[0]))
span= post.Thread().Title span= post.Thread().Title