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
|
||||
}
|
||||
|
||||
|
||||
|
@ -81,11 +81,18 @@ followButton currentUser relationship account =
|
||||
, "Unfollow"
|
||||
)
|
||||
else
|
||||
( FollowAccount account
|
||||
, "btn btn-default btn-follow"
|
||||
, "eye-open"
|
||||
, "Follow"
|
||||
)
|
||||
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"
|
||||
, "eye-open"
|
||||
, "Follow"
|
||||
)
|
||||
in
|
||||
button [ class btnClasses, title tooltip, onClick followEvent ]
|
||||
[ Common.icon iconName ]
|
||||
@ -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