Fix incoming home timeline statuses spawn into thread.
This commit is contained in:
parent
54ef5210df
commit
f717b6857f
|
@ -117,7 +117,7 @@ update msg model =
|
||||||
isThreadMember : Thread -> Status -> Bool
|
isThreadMember : Thread -> Status -> Bool
|
||||||
isThreadMember thread status =
|
isThreadMember thread status =
|
||||||
case ( thread.status, thread.context ) of
|
case ( thread.status, thread.context ) of
|
||||||
( Just status, Just context ) ->
|
( Just threadStatus, Just context ) ->
|
||||||
case status.in_reply_to_id of
|
case status.in_reply_to_id of
|
||||||
Nothing ->
|
Nothing ->
|
||||||
False
|
False
|
||||||
|
@ -126,7 +126,7 @@ isThreadMember thread status =
|
||||||
let
|
let
|
||||||
threadStatusIds =
|
threadStatusIds =
|
||||||
List.concat
|
List.concat
|
||||||
[ [ status.id ]
|
[ [ threadStatus.id ]
|
||||||
, List.map .id context.ancestors
|
, List.map .id context.ancestors
|
||||||
, List.map .id context.descendants
|
, List.map .id context.descendants
|
||||||
]
|
]
|
||||||
|
@ -153,7 +153,7 @@ appendToThreadDescendants ({ context } as thread) status =
|
||||||
updateCurrentViewWithStatus : Status -> Model -> Model
|
updateCurrentViewWithStatus : Status -> Model -> Model
|
||||||
updateCurrentViewWithStatus status ({ accountInfo } as model) =
|
updateCurrentViewWithStatus status ({ accountInfo } as model) =
|
||||||
case model.currentView of
|
case model.currentView of
|
||||||
ThreadView ({ context } as thread) ->
|
ThreadView thread ->
|
||||||
if isThreadMember thread status then
|
if isThreadMember thread status then
|
||||||
{ model | currentView = ThreadView (appendToThreadDescendants thread status) }
|
{ model | currentView = ThreadView (appendToThreadDescendants thread status) }
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue