From 65b46159ecc34451c018b9923f48740d35d4f0f8 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 21 Jun 2017 01:37:15 +0200 Subject: [PATCH] Revert #3851 (#3878) --- app/javascript/mastodon/components/status.js | 8 -------- .../features/ui/util/intersection_observer_wrapper.js | 7 ------- 2 files changed, 15 deletions(-) diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index e77d1eb910..325aceb5b3 100644 --- a/app/javascript/mastodon/components/status.js +++ b/app/javascript/mastodon/components/status.js @@ -91,14 +91,6 @@ class Status extends ImmutablePureComponent { } componentWillUnmount () { - if (!this.props.intersectionObserverWrapper) { - // TODO: enable IntersectionObserver optimization for notification statuses. - // These are managed in notifications/index.js rather than status_list.js - return; - } - - this.props.intersectionObserverWrapper.unobserve(this.props.id, this.node); - this.componentMounted = false; } diff --git a/app/javascript/mastodon/features/ui/util/intersection_observer_wrapper.js b/app/javascript/mastodon/features/ui/util/intersection_observer_wrapper.js index b15f8b9ef5..0e959f9ae8 100644 --- a/app/javascript/mastodon/features/ui/util/intersection_observer_wrapper.js +++ b/app/javascript/mastodon/features/ui/util/intersection_observer_wrapper.js @@ -37,13 +37,6 @@ class IntersectionObserverWrapper { } } - unobserve (id, node) { - if (this.observer) { - delete this.callbacks[id]; - this.observer.unobserve(node); - } - } - disconnect () { if (this.observer) { this.observer.disconnect();