aboutsummaryrefslogtreecommitdiff
path: root/renderer
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2019-12-21 08:36:44 +0000
committerr <r@freesoftwareextremist.com>2019-12-21 08:38:42 +0000
commit39c57a6b653a269668f459414d295e812f3628a8 (patch)
tree3b00e5ec638f592699d31562675b1b1e2d5da8c7 /renderer
parentdf875381d4e2c9a0bd283acc3592cde6562f5e5e (diff)
downloadbloat-39c57a6b653a269668f459414d295e812f3628a8.tar.gz
bloat-39c57a6b653a269668f459414d295e812f3628a8.zip
Use a single form for new posts and replies
Diffstat (limited to 'renderer')
-rw-r--r--renderer/model.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/renderer/model.go b/renderer/model.go
index 053c2fd..ce81e78 100644
--- a/renderer/model.go
+++ b/renderer/model.go
@@ -2,6 +2,7 @@ package renderer
import (
"mastodon"
+ "web/model"
)
type NavbarTemplateData struct {
@@ -37,17 +38,15 @@ func NewTimelinePageTemplateData(statuses []*mastodon.Status, hasNext bool, next
type ThreadPageTemplateData struct {
Statuses []*mastodon.Status
- ReplyToID string
- ReplyContent string
+ ReplyContext *model.ReplyContext
ReplyMap map[string][]mastodon.ReplyInfo
NavbarData *NavbarTemplateData
}
-func NewThreadPageTemplateData(statuses []*mastodon.Status, replyToID string, replyContent string, replyMap map[string][]mastodon.ReplyInfo, navbarData *NavbarTemplateData) *ThreadPageTemplateData {
+func NewThreadPageTemplateData(statuses []*mastodon.Status, replyContext *model.ReplyContext, replyMap map[string][]mastodon.ReplyInfo, navbarData *NavbarTemplateData) *ThreadPageTemplateData {
return &ThreadPageTemplateData{
Statuses: statuses,
- ReplyToID: replyToID,
- ReplyContent: replyContent,
+ ReplyContext: replyContext,
ReplyMap: replyMap,
NavbarData: navbarData,
}