about summary refs log tree commit diff
path: root/app/javascript/mastodon/components/intersection_observer_article.js
diff options
context:
space:
mode:
authorMatt Panaro <matt.panaro@gmail.com>2020-01-02 16:46:42 -0500
committerEugen Rochko <eugen@zeonfederated.com>2020-01-02 22:46:42 +0100
commit9cbbc50fcdfe2ec852107b1757d92d54b862a91a (patch)
treefcf25f963b86a093ada64042422af05197b84793 /app/javascript/mastodon/components/intersection_observer_article.js
parentaa138ea350dfb2a47ef0b29eff811c6da402a830 (diff)
Fix 12661 (#12744)
* Revert "persist last-intersected status update and restore when ScrollableList is restored"

This reverts commit 07e26142ef6a8e74bd2ac5e9b461a5a1699bd4c8.

accidentally merged spurious code in https://github.com/tootsuite/mastodon/pull/12661.  https://github.com/tootsuite/mastodon/pull/12735 removes the slowdown that this code was trying to solve; and other functionality successfully restores the view state of the list

* Revert "cache currently-viewing status id to avoid calling redux with identical value"

This reverts commit c93df2159fbd3888a5c48d8a8b8ae61dbbc54b89.

accidentally merged spurious code in https://github.com/tootsuite/mastodon/pull/12661.  https://github.com/tootsuite/mastodon/pull/12735 removes the slowdown that this code was trying to solve; and other functionality successfully restores the view state of the list
Diffstat (limited to 'app/javascript/mastodon/components/intersection_observer_article.js')
-rw-r--r--app/javascript/mastodon/components/intersection_observer_article.js6
1 files changed, 0 insertions, 6 deletions
diff --git a/app/javascript/mastodon/components/intersection_observer_article.js b/app/javascript/mastodon/components/intersection_observer_article.js
index d475e5d1c..e453730ba 100644
--- a/app/javascript/mastodon/components/intersection_observer_article.js
+++ b/app/javascript/mastodon/components/intersection_observer_article.js
@@ -20,8 +20,6 @@ export default class IntersectionObserverArticle extends React.Component {
     cachedHeight: PropTypes.number,
     onHeightChange: PropTypes.func,
     children: PropTypes.node,
-    currentlyViewing: PropTypes.number,
-    updateCurrentlyViewing: PropTypes.func,
   };
 
   state = {
@@ -50,8 +48,6 @@ export default class IntersectionObserverArticle extends React.Component {
     );
 
     this.componentMounted = true;
-
-    if(id === this.props.currentlyViewing) this.node.scrollIntoView();
   }
 
   componentWillUnmount () {
@@ -64,8 +60,6 @@ export default class IntersectionObserverArticle extends React.Component {
   handleIntersection = (entry) => {
     this.entry = entry;
 
-    if(entry.intersectionRatio > 0.75 && this.props.updateCurrentlyViewing) this.props.updateCurrentlyViewing(this.id);
-
     scheduleIdleTask(this.calculateHeight);
     this.setState(this.updateStateAfterIntersection);
   }