Updated to latest arn API
This commit is contained in:
parent
681177b28e
commit
9aa3d9de62
@ -8,6 +8,6 @@ component ThreadLink(thread *arn.Thread)
|
|||||||
Icon("thumb-tack")
|
Icon("thumb-tack")
|
||||||
a.thread-link-title(href="/thread/" + thread.ID)= thread.Title
|
a.thread-link-title(href="/thread/" + thread.ID)= thread.Title
|
||||||
.spacer
|
.spacer
|
||||||
.thread-reply-count= len(thread.Posts)
|
.thread-reply-count= len(thread.PostIDs)
|
||||||
.thread-icons
|
.thread-icons
|
||||||
Icon(arn.GetForumIcon(thread.Tags[0]))
|
Icon(arn.GetForumIcon(thread.Tags[0]))
|
@ -22,12 +22,7 @@ func Get(ctx *aero.Context) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fetch posts
|
// Fetch posts
|
||||||
postObjects := arn.DB.GetMany("Post", thread.Posts)
|
posts := thread.Posts()
|
||||||
posts := make([]*arn.Post, len(postObjects))
|
|
||||||
|
|
||||||
for i, obj := range postObjects {
|
|
||||||
posts[i] = obj.(*arn.Post)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sort posts
|
// Sort posts
|
||||||
arn.SortPostsLatestLast(posts)
|
arn.SortPostsLatestLast(posts)
|
||||||
|
@ -63,7 +63,8 @@ export function forumReply(arn: AnimeNotifier) {
|
|||||||
|
|
||||||
let post = {
|
let post = {
|
||||||
text: textarea.value,
|
text: textarea.value,
|
||||||
threadId: thread.dataset.id,
|
parentId: thread.dataset.id,
|
||||||
|
parentType: "Thread",
|
||||||
tags: []
|
tags: []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user