From f0f791bb76bbe1e8ea4329b3c5ebcbb9f7076b0d Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 16 Oct 2016 19:23:17 +0200 Subject: 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 --- app/helpers/home_helper.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'app/helpers') 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 -- cgit