aboutsummaryrefslogtreecommitdiff
path: root/renderer
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2020-01-31 03:38:49 +0000
committerr <r@freesoftwareextremist.com>2020-01-31 03:38:49 +0000
commita981085260af2623bd4988e4b9c0052e2e3035eb (patch)
tree8b1f2f35274a2e5fee77f2498f0b7569dca18b7e /renderer
parent6a6cc744b7d9ed1b57dc2e88cd22e73275d5dcbe (diff)
downloadbloat-a981085260af2623bd4988e4b9c0052e2e3035eb.tar.gz
bloat-a981085260af2623bd4988e4b9c0052e2e3035eb.zip
Update user page
- Use the same page to display status and user list - Add media only status list
Diffstat (limited to 'renderer')
-rw-r--r--renderer/model.go14
-rw-r--r--renderer/renderer.go12
2 files changed, 2 insertions, 24 deletions
diff --git a/renderer/model.go b/renderer/model.go
index 77e6704..2aa2f22 100644
--- a/renderer/model.go
+++ b/renderer/model.go
@@ -69,6 +69,8 @@ type NotificationData struct {
type UserData struct {
*CommonData
User *mastodon.Account
+ Type string
+ Users []*mastodon.Account
Statuses []*mastodon.Status
NextLink string
DarkMode bool
@@ -103,18 +105,6 @@ type RetweetedByData struct {
NextLink string
}
-type FollowingData struct {
- *CommonData
- Users []*mastodon.Account
- NextLink string
-}
-
-type FollowersData struct {
- *CommonData
- Users []*mastodon.Account
- NextLink string
-}
-
type SearchData struct {
*CommonData
Q string
diff --git a/renderer/renderer.go b/renderer/renderer.go
index cbb6c73..5e03158 100644
--- a/renderer/renderer.go
+++ b/renderer/renderer.go
@@ -28,8 +28,6 @@ type Renderer interface {
RenderEmojiPage(ctx *Context, writer io.Writer, data *EmojiData) (err error)
RenderLikedByPage(ctx *Context, writer io.Writer, data *LikedByData) (err error)
RenderRetweetedByPage(ctx *Context, writer io.Writer, data *RetweetedByData) (err error)
- RenderFollowingPage(ctx *Context, writer io.Writer, data *FollowingData) (err error)
- RenderFollowersPage(ctx *Context, writer io.Writer, data *FollowersData) (err error)
RenderSearchPage(ctx *Context, writer io.Writer, data *SearchData) (err error)
RenderSettingsPage(ctx *Context, writer io.Writer, data *SettingsData) (err error)
}
@@ -113,16 +111,6 @@ func (r *renderer) RenderRetweetedByPage(ctx *Context, writer io.Writer,
return r.template.ExecuteTemplate(writer, "retweetedby.tmpl", WithContext(data, ctx))
}
-func (r *renderer) RenderFollowingPage(ctx *Context, writer io.Writer,
- data *FollowingData) (err error) {
- return r.template.ExecuteTemplate(writer, "following.tmpl", WithContext(data, ctx))
-}
-
-func (r *renderer) RenderFollowersPage(ctx *Context, writer io.Writer,
- data *FollowersData) (err error) {
- return r.template.ExecuteTemplate(writer, "followers.tmpl", WithContext(data, ctx))
-}
-
func (r *renderer) RenderSearchPage(ctx *Context, writer io.Writer,
data *SearchData) (err error) {
return r.template.ExecuteTemplate(writer, "search.tmpl", WithContext(data, ctx))