From 547dfd770abeddc3e36226a0321fab99d678701a Mon Sep 17 00:00:00 2001 From: Nicolas Perriault Date: Sun, 14 May 2017 11:25:34 +0200 Subject: [PATCH] Preserve scroll context when posting a status. --- src/Update/Main.elm | 5 ++++- src/Update/Mastodon.elm | 5 +---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Update/Main.elm b/src/Update/Main.elm index 56c8e8c..8e55836 100644 --- a/src/Update/Main.elm +++ b/src/Update/Main.elm @@ -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 diff --git a/src/Update/Mastodon.elm b/src/Update/Mastodon.elm index be9dba5..2e81754 100644 --- a/src/Update/Mastodon.elm +++ b/src/Update/Mastodon.elm @@ -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