Add follow requested indicator
This commit is contained in:
parent
5566d320f5
commit
b30c66356a
@ -210,6 +210,7 @@ relationshipDecoder =
|
||||
|> Pipe.required "following" Decode.bool
|
||||
|> Pipe.required "muting" Decode.bool
|
||||
|> Pipe.required "requested" Decode.bool
|
||||
|> Pipe.required "blocked_by" Decode.bool
|
||||
|
||||
|
||||
tagDecoder : Decode.Decoder Tag
|
||||
|
@ -231,6 +231,7 @@ type alias Relationship =
|
||||
, following : Bool
|
||||
, muting : Bool
|
||||
, requested : Bool
|
||||
, blocked_by : Bool
|
||||
}
|
||||
|
||||
|
||||
|
@ -80,6 +80,13 @@ followButton currentUser relationship account =
|
||||
, "eye-close"
|
||||
, "Unfollow"
|
||||
)
|
||||
else
|
||||
if relationship.requested then
|
||||
( UnfollowAccount account
|
||||
, "btn btn-default btn-follow btn-warning"
|
||||
, "remove-sign"
|
||||
, "Cancel follow request"
|
||||
)
|
||||
else
|
||||
( FollowAccount account
|
||||
, "btn btn-default btn-follow"
|
||||
@ -376,6 +383,10 @@ accountView subView currentUser accountInfo =
|
||||
span [ class "badge blocking" ] [ text "Blocked" ]
|
||||
else
|
||||
text ""
|
||||
, if relationship.blocked_by then
|
||||
span [ class "badge blocking" ] [ text "Blocks you" ]
|
||||
else
|
||||
text ""
|
||||
]
|
||||
|
||||
Nothing ->
|
||||
|
Loading…
Reference in New Issue
Block a user