diff --git a/app/soapbox/actions/settings.js b/app/soapbox/actions/settings.js index 47b153ee7..cd503f02b 100644 --- a/app/soapbox/actions/settings.js +++ b/app/soapbox/actions/settings.js @@ -31,6 +31,7 @@ export const defaultSettings = ImmutableMap({ showExplanationBox: true, explanationBox: true, otpEnabled: false, + autoloadTimelines: true, systemFont: false, dyslexicFont: false, diff --git a/app/soapbox/components/timeline_queue_button_header.js b/app/soapbox/components/timeline_queue_button_header.js index 2dc194312..8328d3292 100644 --- a/app/soapbox/components/timeline_queue_button_header.js +++ b/app/soapbox/components/timeline_queue_button_header.js @@ -1,11 +1,22 @@ import React from 'react'; import PropTypes from 'prop-types'; +import { connect } from 'react-redux'; import { injectIntl } from 'react-intl'; import { throttle } from 'lodash'; import classNames from 'classnames'; import Icon from 'soapbox/components/icon'; +import { getSettings } from 'soapbox/actions/settings'; -export default @injectIntl +const mapStateToProps = state => { + const settings = getSettings(state); + + return { + autoload: settings.get('autoloadTimelines'), + }; +}; + +export default @connect(mapStateToProps) +@injectIntl class TimelineQueueButtonHeader extends React.PureComponent { static propTypes = { diff --git a/app/soapbox/features/preferences/index.js b/app/soapbox/features/preferences/index.js index 6bde12793..73ecc5cd3 100644 --- a/app/soapbox/features/preferences/index.js +++ b/app/soapbox/features/preferences/index.js @@ -230,6 +230,10 @@ class Preferences extends ImmutablePureComponent { label={} path={['reduceMotion']} /> + } + path={['autoloadTimelines']} + /> } path={['underlineLinks']}