From c7e5a0af57fb5de9276b7f7f685dce9ab40ae85e Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Sun, 27 May 2018 17:42:54 +0200 Subject: [PATCH] Do not needlessly refresh pinned toots Port missing part of b29feb5c67359677fed079bd3a5fdb96c2658543 to glitch-soc --- .../flavours/glitch/features/account_timeline/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/features/account_timeline/index.js b/app/javascript/flavours/glitch/features/account_timeline/index.js index fbb16dff9b..d158b5087f 100644 --- a/app/javascript/flavours/glitch/features/account_timeline/index.js +++ b/app/javascript/flavours/glitch/features/account_timeline/index.js @@ -40,14 +40,18 @@ export default class AccountTimeline extends ImmutablePureComponent { const { params: { accountId }, withReplies } = this.props; this.props.dispatch(fetchAccount(accountId)); - this.props.dispatch(refreshAccountFeaturedTimeline(accountId)); + if (!withReplies) { + this.props.dispatch(refreshAccountFeaturedTimeline(accountId)); + } this.props.dispatch(refreshAccountTimeline(accountId, withReplies)); } componentWillReceiveProps (nextProps) { if ((nextProps.params.accountId !== this.props.params.accountId && nextProps.params.accountId) || nextProps.withReplies !== this.props.withReplies) { this.props.dispatch(fetchAccount(nextProps.params.accountId)); - this.props.dispatch(refreshAccountFeaturedTimeline(nextProps.params.accountId)); + if (!nextProps.withReplies) { + this.props.dispatch(refreshAccountFeaturedTimeline(nextProps.params.accountId)); + } this.props.dispatch(refreshAccountTimeline(nextProps.params.accountId, nextProps.params.withReplies)); } }