Fix #127: Avoid requesting relationships without providing ids.
This commit is contained in:
parent
fcfa767b91
commit
50ee7646fd
|
@ -230,13 +230,16 @@ requestRelationships client ids =
|
||||||
|
|
||||||
loadRelationships : Maybe Client -> List Int -> Cmd Msg
|
loadRelationships : Maybe Client -> List Int -> Cmd Msg
|
||||||
loadRelationships client ids =
|
loadRelationships client ids =
|
||||||
case client of
|
if List.length ids > 0 then
|
||||||
Just client ->
|
case client of
|
||||||
requestRelationships client ids
|
Just client ->
|
||||||
|> send (MastodonEvent << AccountRelationships)
|
requestRelationships client ids
|
||||||
|
|> send (MastodonEvent << AccountRelationships)
|
||||||
|
|
||||||
Nothing ->
|
Nothing ->
|
||||||
Cmd.none
|
Cmd.none
|
||||||
|
else
|
||||||
|
Cmd.none
|
||||||
|
|
||||||
|
|
||||||
loadThread : Maybe Client -> Status -> Cmd Msg
|
loadThread : Maybe Client -> Status -> Cmd Msg
|
||||||
|
|
|
@ -670,7 +670,7 @@ processMastodonEvent msg model =
|
||||||
! [ Command.loadRelationships model.client <| List.map .id decoded ]
|
! [ Command.loadRelationships model.client <| List.map .id decoded ]
|
||||||
|
|
||||||
Err error ->
|
Err error ->
|
||||||
{ model | errors = (errorText error) :: model.errors } ! []
|
{ model | errors = (errorText (Debug.log "error" error)) :: model.errors } ! []
|
||||||
|
|
||||||
AccountFollowing result ->
|
AccountFollowing result ->
|
||||||
case result of
|
case result of
|
||||||
|
|
Loading…
Reference in New Issue