aboutsummaryrefslogtreecommitdiff
path: root/renderer
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2020-02-08 11:50:14 +0000
committerr <r@freesoftwareextremist.com>2020-02-08 11:50:14 +0000
commita68a09a83ef2eb411e2a7a66e919f27c040c0b6a (patch)
tree12365055d6865c10a5d61f7a81c07987dfbf9f22 /renderer
parent1e44d5d3d50c850505065ef16bc513a207c0656c (diff)
downloadbloat-a68a09a83ef2eb411e2a7a66e919f27c040c0b6a.tar.gz
bloat-a68a09a83ef2eb411e2a7a66e919f27c040c0b6a.zip
Remove account relationship buttons for logged in user's page
Diffstat (limited to 'renderer')
-rw-r--r--renderer/model.go22
1 files changed, 16 insertions, 6 deletions
diff --git a/renderer/model.go b/renderer/model.go
index 4ff73c3..842dd71 100644
--- a/renderer/model.go
+++ b/renderer/model.go
@@ -31,6 +31,15 @@ type CommonData struct {
NavbarData *NavbarData
}
+func (c CommonData) IsCurrentUser(id string) bool {
+ if c.NavbarData != nil &&
+ c.NavbarData.User != nil &&
+ c.NavbarData.User.ID == id {
+ return true
+ }
+ return false
+}
+
type ErrorData struct {
*CommonData
Error string
@@ -69,12 +78,13 @@ type NotificationData struct {
type UserData struct {
*CommonData
- User *mastodon.Account
- Type string
- Users []*mastodon.Account
- Statuses []*mastodon.Status
- NextLink string
- DarkMode bool
+ User *mastodon.Account
+ IsCurrent bool
+ Type string
+ Users []*mastodon.Account
+ Statuses []*mastodon.Status
+ NextLink string
+ DarkMode bool
}
type UserSearchData struct {