Clean timelines when switching accounts.

This commit is contained in:
Nicolas Perriault 2017-05-13 11:54:35 +02:00
parent 9753efe7e8
commit 1fc6d6b4a2
No known key found for this signature in database
GPG Key ID: DA5E4C83904F7A2A

View File

@ -61,6 +61,15 @@ update msg model =
in
{ model
| clients = newClients
, homeTimeline = Update.Timeline.empty "home-timeline"
, localTimeline = Update.Timeline.empty "local-timeline"
, globalTimeline = Update.Timeline.empty "global-timeline"
, accountTimeline = Update.Timeline.empty "account-timeline"
, accountFollowers = Update.Timeline.empty "account-followers"
, accountFollowing = Update.Timeline.empty "account-following"
, notifications = Update.Timeline.empty "notifications"
, accountRelationships = []
, accountRelationship = Nothing
, currentView = Update.Timeline.preferred model
}
! [ Command.loadUserAccount <| Just client