Do not needlessly refresh pinned toots
Port missing part of 6ae70a92c9
to glitch-soc
remotes/1727458204337373841/tmp_refs/heads/signup-info-prompt
parent
60addb14ce
commit
a81ed7b205
|
@ -40,14 +40,18 @@ export default class AccountTimeline extends ImmutablePureComponent {
|
||||||
const { params: { accountId }, withReplies } = this.props;
|
const { params: { accountId }, withReplies } = this.props;
|
||||||
|
|
||||||
this.props.dispatch(fetchAccount(accountId));
|
this.props.dispatch(fetchAccount(accountId));
|
||||||
this.props.dispatch(refreshAccountFeaturedTimeline(accountId));
|
if (!withReplies) {
|
||||||
|
this.props.dispatch(refreshAccountFeaturedTimeline(accountId));
|
||||||
|
}
|
||||||
this.props.dispatch(refreshAccountTimeline(accountId, withReplies));
|
this.props.dispatch(refreshAccountTimeline(accountId, withReplies));
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps (nextProps) {
|
componentWillReceiveProps (nextProps) {
|
||||||
if ((nextProps.params.accountId !== this.props.params.accountId && nextProps.params.accountId) || nextProps.withReplies !== this.props.withReplies) {
|
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(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));
|
this.props.dispatch(refreshAccountTimeline(nextProps.params.accountId, nextProps.params.withReplies));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue