]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Fix follower/following lists resetting on back-navigation in web UI
authorEugen Rochko <eugen@zeonfederated.com>
Sun, 29 Sep 2019 14:27:00 +0000 (16:27 +0200)
committerThibaut Girka <thib@sitedethib.com>
Mon, 30 Sep 2019 13:58:29 +0000 (15:58 +0200)
Port 9683e1dcf8bbddb07b818960abf254248be3575c to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
app/javascript/flavours/glitch/features/favourites/index.js
app/javascript/flavours/glitch/features/followers/index.js
app/javascript/flavours/glitch/features/following/index.js
app/javascript/flavours/glitch/features/reblogs/index.js

index 5c33c8677bb42c31f401b6a7c0d13c9299a42cd7..7afadf12ee34f4f4b9e6ab7696fba4c7c841b3a5 100644 (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) {
index b12efa77496d8849a37b1bb39b8fc951d7d5a9c8..2bd0e6e2f4c3a54f227300c68ba2672fc032270a 100644 (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) {
index 9ea008e614f74411a3081716aca5ac89a38ed9fe..f03da0c9416cfa2233e1cf82421f631da234d283 100644 (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) {
index 1fc26b0d7993bb76cc919c4ef3880f8748a1a053..a8e9db7f5adbf6de96e96494fa03adae7b796c01 100644 (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) {