1
0
mirror of https://github.com/funamitech/mastodon synced 2024-11-24 07:06:34 +09:00

Fix follower/following lists resetting on back-navigation in web UI (#11986)

Fix #11452
This commit is contained in:
Eugen Rochko 2019-09-29 16:27:00 +02:00 committed by GitHub
parent 368a87755b
commit 9683e1dcf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 6 deletions

View File

@ -27,7 +27,9 @@ class Favourites extends ImmutablePureComponent {
}; };
componentWillMount () { componentWillMount () {
this.props.dispatch(fetchFavourites(this.props.params.statusId)); if (!this.props.accountIds) {
this.props.dispatch(fetchFavourites(this.props.params.statusId));
}
} }
componentWillReceiveProps (nextProps) { componentWillReceiveProps (nextProps) {

View File

@ -40,8 +40,10 @@ class Followers extends ImmutablePureComponent {
}; };
componentWillMount () { componentWillMount () {
this.props.dispatch(fetchAccount(this.props.params.accountId)); if (!this.props.accountIds) {
this.props.dispatch(fetchFollowers(this.props.params.accountId)); this.props.dispatch(fetchAccount(this.props.params.accountId));
this.props.dispatch(fetchFollowers(this.props.params.accountId));
}
} }
componentWillReceiveProps (nextProps) { componentWillReceiveProps (nextProps) {

View File

@ -40,8 +40,10 @@ class Following extends ImmutablePureComponent {
}; };
componentWillMount () { componentWillMount () {
this.props.dispatch(fetchAccount(this.props.params.accountId)); if (!this.props.accountIds) {
this.props.dispatch(fetchFollowing(this.props.params.accountId)); this.props.dispatch(fetchAccount(this.props.params.accountId));
this.props.dispatch(fetchFollowing(this.props.params.accountId));
}
} }
componentWillReceiveProps (nextProps) { componentWillReceiveProps (nextProps) {

View File

@ -27,7 +27,9 @@ class Reblogs extends ImmutablePureComponent {
}; };
componentWillMount () { componentWillMount () {
this.props.dispatch(fetchReblogs(this.props.params.statusId)); if (!this.props.accountIds) {
this.props.dispatch(fetchReblogs(this.props.params.statusId));
}
} }
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {