lbry-desktop/ui/component/settingDisableAutoUpdates/index.js
Franco Montenegro 48c5f58a8e Multiple fixes in auto updates.
- Add "disable auto updates" setting (prevents downloading updates in the background but will still notify if there are newer versions)
- Prevent downloading multiple times the same update
- Hide nag when auto update modal is displayed
2022-02-22 13:14:17 -05:00

17 lines
605 B
JavaScript

import SettingDisableAutoUpdates from './view';
import * as SETTINGS from 'constants/settings';
import { connect } from 'react-redux';
import { makeSelectClientSetting } from 'redux/selectors/settings';
import { doSetClientSetting } from 'redux/actions/settings';
const select = (state) => {
return {
disableAutoUpdates: makeSelectClientSetting(SETTINGS.DISABLE_AUTO_UPDATES)(state),
};
};
const perform = (dispatch) => ({
setClientSetting: (value) => dispatch(doSetClientSetting(SETTINGS.DISABLE_AUTO_UPDATES, value)),
});
export default connect(select, perform)(SettingDisableAutoUpdates);