Browse Source

[Glitch] Fix follower/following lists resetting on back-navigation in web UI

Port 9683e1dcf8 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
closed-social-glitch-2
Eugen Rochko 5 years ago
committed by Thibaut Girka
parent
commit
a2bf1f9f56
4 changed files with 14 additions and 6 deletions
  1. +3
    -1
      app/javascript/flavours/glitch/features/favourites/index.js
  2. +4
    -2
      app/javascript/flavours/glitch/features/followers/index.js
  3. +4
    -2
      app/javascript/flavours/glitch/features/following/index.js
  4. +3
    -1
      app/javascript/flavours/glitch/features/reblogs/index.js

+ 3
- 1
app/javascript/flavours/glitch/features/favourites/index.js View File

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

+ 4
- 2
app/javascript/flavours/glitch/features/followers/index.js View File

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

+ 4
- 2
app/javascript/flavours/glitch/features/following/index.js View File

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

+ 3
- 1
app/javascript/flavours/glitch/features/reblogs/index.js View File

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

Loading…
Cancel
Save