Add autoloadTimelines
user setting to configure timeline loading behavior
This commit is contained in:
parent
27a30078a3
commit
04787678a2
3 changed files with 17 additions and 1 deletions
|
@ -31,6 +31,7 @@ export const defaultSettings = ImmutableMap({
|
|||
showExplanationBox: true,
|
||||
explanationBox: true,
|
||||
otpEnabled: false,
|
||||
autoloadTimelines: true,
|
||||
|
||||
systemFont: false,
|
||||
dyslexicFont: false,
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -230,6 +230,10 @@ class Preferences extends ImmutablePureComponent {
|
|||
label={<FormattedMessage id='preferences.fields.reduce_motion_label' defaultMessage='Reduce motion in animations' />}
|
||||
path={['reduceMotion']}
|
||||
/>
|
||||
<SettingsCheckbox
|
||||
label={<FormattedMessage id='preferences.fields.autoload_timelines_label' defaultMessage='Automatically load new posts when scrolled to the top of the page' />}
|
||||
path={['autoloadTimelines']}
|
||||
/>
|
||||
<SettingsCheckbox
|
||||
label={<FormattedMessage id='preferences.fields.underline_links_label' defaultMessage='Always underline links in posts' />}
|
||||
path={['underlineLinks']}
|
||||
|
|
Loading…
Reference in a new issue