]> cat aescling's git repositories - mastodon.git/commitdiff
Fix follower/following lists resetting on back-navigation in web UI (#11986)
authorEugen Rochko <eugen@zeonfederated.com>
Sun, 29 Sep 2019 14:27:00 +0000 (16:27 +0200)
committerGitHub <noreply@github.com>
Sun, 29 Sep 2019 14:27:00 +0000 (16:27 +0200)
Fix #11452

app/javascript/mastodon/features/favourites/index.js
app/javascript/mastodon/features/followers/index.js
app/javascript/mastodon/features/following/index.js
app/javascript/mastodon/features/reblogs/index.js

index 62d3c2f0674959197b4819117c02cbe6ebfca576..90c26f0c32f8894cefaa55f2380140d97d916c1b 100644 (file)
@@ -27,7 +27,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) {
index 3913bf8d0795961fb2dc82120e2fe96f0ea105db..9e635d2501cfe3a951ceea46b2d59073a163e3f1 100644 (file)
@@ -40,8 +40,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) {
index 8e126f4c391c848038d7f3c38fb3a55590b6a4eb..284ae2c11ea86fbcac08686ab53f434c4f216229 100644 (file)
@@ -40,8 +40,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) {
index 229f626b3ecc0c642ca22ff9ca947f404a5f5550..7edcf1968d84ae362582be36361c56a80963022f 100644 (file)
@@ -27,7 +27,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) {