diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-03-18 18:34:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-18 18:34:56 +0100 |
commit | 42c581c45853cf08f2c9c521d59a2194ef2d9c61 (patch) | |
tree | b6b2a47261c489bad3a4a93f2d562be04ad311b5 /app/javascript | |
parent | f85b66eb8cc9513822d0ece3928b12aa789bb410 (diff) |
Disable real-time updates on public pages to improve readability (#10260)
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/mastodon/features/standalone/hashtag_timeline/index.js | 9 | ||||
-rw-r--r-- | app/javascript/mastodon/features/standalone/public_timeline/index.js | 14 |
2 files changed, 0 insertions, 23 deletions
diff --git a/app/javascript/mastodon/features/standalone/hashtag_timeline/index.js b/app/javascript/mastodon/features/standalone/hashtag_timeline/index.js index 0880d98c8..73919c39d 100644 --- a/app/javascript/mastodon/features/standalone/hashtag_timeline/index.js +++ b/app/javascript/mastodon/features/standalone/hashtag_timeline/index.js @@ -3,7 +3,6 @@ import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { expandHashtagTimeline } from 'mastodon/actions/timelines'; -import { connectHashtagStream } from 'mastodon/actions/streaming'; import Masonry from 'react-masonry-infinite'; import { List as ImmutableList } from 'immutable'; import DetailedStatusContainer from 'mastodon/features/status/containers/detailed_status_container'; @@ -31,14 +30,6 @@ class HashtagTimeline extends React.PureComponent { const { dispatch, hashtag } = this.props; dispatch(expandHashtagTimeline(hashtag)); - this.disconnect = dispatch(connectHashtagStream(hashtag, hashtag)); - } - - componentWillUnmount () { - if (this.disconnect) { - this.disconnect(); - this.disconnect = null; - } } handleLoadMore = () => { diff --git a/app/javascript/mastodon/features/standalone/public_timeline/index.js b/app/javascript/mastodon/features/standalone/public_timeline/index.js index 10129e606..19b0b14be 100644 --- a/app/javascript/mastodon/features/standalone/public_timeline/index.js +++ b/app/javascript/mastodon/features/standalone/public_timeline/index.js @@ -3,7 +3,6 @@ import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { expandPublicTimeline, expandCommunityTimeline } from 'mastodon/actions/timelines'; -import { connectPublicStream, connectCommunityStream } from 'mastodon/actions/streaming'; import Masonry from 'react-masonry-infinite'; import { List as ImmutableList, Map as ImmutableMap } from 'immutable'; import DetailedStatusContainer from 'mastodon/features/status/containers/detailed_status_container'; @@ -37,27 +36,14 @@ class PublicTimeline extends React.PureComponent { componentDidUpdate (prevProps) { if (prevProps.local !== this.props.local) { - this._disconnect(); this._connect(); } } - componentWillUnmount () { - this._disconnect(); - } - _connect () { const { dispatch, local } = this.props; dispatch(local ? expandCommunityTimeline() : expandPublicTimeline()); - this.disconnect = dispatch(local ? connectCommunityStream() : connectPublicStream()); - } - - _disconnect () { - if (this.disconnect) { - this.disconnect(); - this.disconnect = null; - } } handleLoadMore = () => { |