2020-08-13 18:57:00 +02:00
|
|
|
import { connect } from 'react-redux';
|
2021-10-17 10:36:14 +02:00
|
|
|
import * as SETTINGS from 'constants/settings';
|
2020-08-13 18:57:00 +02:00
|
|
|
import { doSetAppToTrayWhenClosed } from 'redux/actions/settings';
|
|
|
|
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
|
|
|
import SettingClosingBehavior from './view';
|
|
|
|
|
2021-10-17 10:36:14 +02:00
|
|
|
const select = (state) => ({
|
2020-08-13 18:57:00 +02:00
|
|
|
toTrayWhenClosed: makeSelectClientSetting(SETTINGS.TO_TRAY_WHEN_CLOSED)(state),
|
|
|
|
});
|
|
|
|
|
2021-10-17 10:36:14 +02:00
|
|
|
const perform = (dispatch) => ({
|
|
|
|
setToTrayWhenClosed: (value) => dispatch(doSetAppToTrayWhenClosed(value)),
|
2020-08-13 18:57:00 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(select, perform)(SettingClosingBehavior);
|