Preserve scroll context when posting a status.

This commit is contained in:
Nicolas Perriault 2017-05-14 11:25:34 +02:00
parent 2d0d5cd7b9
commit 547dfd770a
No known key found for this signature in database
GPG Key ID: DA5E4C83904F7A2A
2 changed files with 5 additions and 5 deletions

View File

@ -176,7 +176,10 @@ update msg model =
{ model | viewer = viewer } ! [ commands ]
SubmitDraft ->
model ! [ Command.postStatus (List.head model.clients) <| toStatusRequestBody model.draft ]
model
! [ Command.postStatus (List.head model.clients) <|
toStatusRequestBody model.draft
]
LoadAccount accountId ->
{ model

View File

@ -172,10 +172,7 @@ update msg model =
draft =
Update.Draft.empty
in
{ model | draft = draft }
! [ Command.scrollColumnToTop "home-timeline"
, Command.updateDomStatus draft.status
]
{ model | draft = draft } ! [ Command.updateDomStatus draft.status ]
StatusDeleted result ->
case result of