Removed Postable proxies
This commit is contained in:
@ -13,4 +13,4 @@ component ActivityPost(post *arn.Post, user *arn.User)
|
||||
//- span commented on
|
||||
//- a(href=post.Parent().Link())= post.Parent().TitleByUser(user)
|
||||
|
||||
Postable(post.ToPostable(), user, fmt.Sprintf(`<p class="activity-header"><a href="%s">%s</a></p>`, post.Parent().Link(), post.Parent().TitleByUser(user)), "")
|
||||
Postable(post, user, fmt.Sprintf(`<p class="activity-header"><a href="%s">%s</a></p>`, post.Parent().Link(), post.Parent().TitleByUser(user)), "")
|
@ -1,7 +1,7 @@
|
||||
component Post(post *arn.Post, user *arn.User)
|
||||
.thread
|
||||
.posts
|
||||
Postable(post.ToPostable(), user, "", "")
|
||||
Postable(post, user, "", "")
|
||||
|
||||
.side-note-container.mountable
|
||||
a.side-note(href=post.Parent().Link())= post.Parent().TitleByUser(user)
|
||||
|
@ -23,18 +23,10 @@ func GetPostsByUser(ctx *aero.Context) string {
|
||||
posts := viewUser.Posts()
|
||||
arn.SortPostsLatestFirst(posts)
|
||||
|
||||
var postables []arn.Postable
|
||||
|
||||
if len(posts) >= postLimit {
|
||||
posts = posts[:postLimit]
|
||||
}
|
||||
|
||||
postables = make([]arn.Postable, len(posts))
|
||||
|
||||
for i, post := range posts {
|
||||
postables[i] = arn.ToPostable(post)
|
||||
}
|
||||
|
||||
return ctx.HTML(components.LatestPosts(postables, viewUser, utils.GetUser(ctx), ctx.URI()))
|
||||
return ctx.HTML(components.LatestPosts(arn.ToPostables(posts), viewUser, utils.GetUser(ctx), ctx.URI()))
|
||||
|
||||
}
|
||||
|
@ -3,10 +3,10 @@ component Thread(thread *arn.Thread, posts []*arn.Post, user *arn.User)
|
||||
|
||||
#thread.thread(data-id=thread.ID)
|
||||
.posts
|
||||
Postable(thread.ToPostable(), user, "", thread.Creator().ID)
|
||||
Postable(thread, user, "", thread.Creator().ID)
|
||||
|
||||
each post in posts
|
||||
Postable(post.ToPostable(), user, "", thread.Creator().ID)
|
||||
Postable(post, user, "", thread.Creator().ID)
|
||||
|
||||
//- Reply
|
||||
if user != nil
|
||||
|
Reference in New Issue
Block a user