diff options
author | r <r@freesoftwareextremist.com> | 2019-12-21 13:26:31 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2019-12-21 13:26:31 +0000 |
commit | 2678f33157d147ba548793709cd8fbaabb4eaae2 (patch) | |
tree | 37d4775452f68dc8a52f3156758dc3475feeda68 /renderer | |
parent | 3af4361927d65b896ac3f9e2f0170cbbef63c0c0 (diff) | |
download | bloat-2678f33157d147ba548793709cd8fbaabb4eaae2.tar.gz bloat-2678f33157d147ba548793709cd8fbaabb4eaae2.zip |
Add support for scopes
- Add scope selection for for new post
- Save new post scope in db
- Copy scope on reply
- Show scope icon on posts
Diffstat (limited to 'renderer')
-rw-r--r-- | renderer/model.go | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/renderer/model.go b/renderer/model.go index ce81e78..9380b7f 100644 --- a/renderer/model.go +++ b/renderer/model.go @@ -16,39 +16,41 @@ func NewNavbarTemplateData(notificationCount int) *NavbarTemplateData { } type TimelinePageTemplateData struct { - Statuses []*mastodon.Status - HasNext bool - NextLink string - HasPrev bool - PrevLink string - NavbarData *NavbarTemplateData + Statuses []*mastodon.Status + HasNext bool + NextLink string + HasPrev bool + PrevLink string + PostContext model.PostContext + NavbarData *NavbarTemplateData } func NewTimelinePageTemplateData(statuses []*mastodon.Status, hasNext bool, nextLink string, hasPrev bool, - prevLink string, navbarData *NavbarTemplateData) *TimelinePageTemplateData { + prevLink string, postContext model.PostContext, navbarData *NavbarTemplateData) *TimelinePageTemplateData { return &TimelinePageTemplateData{ - Statuses: statuses, - HasNext: hasNext, - NextLink: nextLink, - HasPrev: hasPrev, - PrevLink: prevLink, - NavbarData: navbarData, + Statuses: statuses, + HasNext: hasNext, + NextLink: nextLink, + HasPrev: hasPrev, + PrevLink: prevLink, + PostContext: postContext, + NavbarData: navbarData, } } type ThreadPageTemplateData struct { - Statuses []*mastodon.Status - ReplyContext *model.ReplyContext - ReplyMap map[string][]mastodon.ReplyInfo - NavbarData *NavbarTemplateData + Statuses []*mastodon.Status + PostContext model.PostContext + ReplyMap map[string][]mastodon.ReplyInfo + NavbarData *NavbarTemplateData } -func NewThreadPageTemplateData(statuses []*mastodon.Status, replyContext *model.ReplyContext, replyMap map[string][]mastodon.ReplyInfo, navbarData *NavbarTemplateData) *ThreadPageTemplateData { +func NewThreadPageTemplateData(statuses []*mastodon.Status, postContext model.PostContext, replyMap map[string][]mastodon.ReplyInfo, navbarData *NavbarTemplateData) *ThreadPageTemplateData { return &ThreadPageTemplateData{ - Statuses: statuses, - ReplyContext: replyContext, - ReplyMap: replyMap, - NavbarData: navbarData, + Statuses: statuses, + PostContext: postContext, + ReplyMap: replyMap, + NavbarData: navbarData, } } |