about summary refs log tree commit diff
path: root/app/helpers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-16 19:23:17 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-16 19:23:17 +0200
commitf0f791bb76bbe1e8ea4329b3c5ebcbb9f7076b0d (patch)
tree266a5d59f806822914fb8e66aad4b9771376842e /app/helpers
parent0895ff414e73212e23c3d680846b5b8b7666bdfd (diff)
Don't preload timelines as props, load them when timeline component is mounted
This prevents the bug where if you go "back" to the UI after navigating to
another page it loads with the old set of statuses
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/home_helper.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb
index 6b5151777..86cce4c01 100644
--- a/app/helpers/home_helper.rb
+++ b/app/helpers/home_helper.rb
@@ -2,13 +2,7 @@ module HomeHelper
   def default_props
     {
       token: @token,
-
-      account: render(file: 'api/v1/accounts/show', locals: { account: current_user.account }, formats: :json),
-
-      timelines: {
-        home: render(file: 'api/v1/statuses/index', locals: { statuses: @home }, formats: :json),
-        mentions: render(file: 'api/v1/statuses/index', locals: { statuses: @mentions }, formats: :json)
-      }
+      account: render(file: 'api/v1/accounts/show', locals: { account: current_user.account }, formats: :json)
     }
   end
 end