From 6e02be73b5ccdd14c4e62952aa2229abad0efb40 Mon Sep 17 00:00:00 2001 From: r Date: Thu, 19 Dec 2019 15:12:35 +0000 Subject: Fix reply template --- renderer/model.go | 4 +--- service/service.go | 2 +- templates/thread.tmpl | 6 +++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/renderer/model.go b/renderer/model.go index 2a320cc..ad356e2 100644 --- a/renderer/model.go +++ b/renderer/model.go @@ -37,17 +37,15 @@ func NewTimelinePageTemplateData(statuses []*mastodon.Status, hasNext bool, next type ThreadPageTemplateData struct { Statuses []*mastodon.Status - PostReply bool ReplyToID string ReplyContent string ReplyMap map[string][]mastodon.ReplyInfo NavbarData *NavbarTemplateData } -func NewThreadPageTemplateData(statuses []*mastodon.Status, postReply bool, replyToID string, replyContent string, replyMap map[string][]mastodon.ReplyInfo, navbarData *NavbarTemplateData) *ThreadPageTemplateData { +func NewThreadPageTemplateData(statuses []*mastodon.Status, replyToID string, replyContent string, replyMap map[string][]mastodon.ReplyInfo, navbarData *NavbarTemplateData) *ThreadPageTemplateData { return &ThreadPageTemplateData{ Statuses: statuses, - PostReply: postReply, ReplyToID: replyToID, ReplyContent: replyContent, ReplyMap: replyMap, diff --git a/service/service.go b/service/service.go index 6c7a37d..556afa6 100644 --- a/service/service.go +++ b/service/service.go @@ -306,7 +306,7 @@ func (svc *service) ServeThreadPage(ctx context.Context, client io.Writer, c *ma return } - data := renderer.NewThreadPageTemplateData(statuses, reply, replyToID, content, replyMap, navbarData) + data := renderer.NewThreadPageTemplateData(statuses, replyToID, content, replyMap, navbarData) err = svc.renderer.RenderThreadPage(ctx, client, data) if err != nil { return diff --git a/templates/thread.tmpl b/templates/thread.tmpl index e36c5ea..3ad5dae 100644 --- a/templates/thread.tmpl +++ b/templates/thread.tmpl @@ -7,10 +7,10 @@ {{if eq .ID $.ReplyToID}}
- - + +
- +
Attachments
-- cgit v1.2.3