From 043c2fa99f266d39fb109c3d2f7714d796da3eea Mon Sep 17 00:00:00 2001 From: warrickct Date: Mon, 22 Nov 2021 17:25:28 +1100 Subject: [PATCH] fixing merge conflicts --- .../session/settings/section/CategoryPrivacy.tsx | 12 ++++++++++++ ts/window.d.ts | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/ts/components/session/settings/section/CategoryPrivacy.tsx b/ts/components/session/settings/section/CategoryPrivacy.tsx index a0565fc83..da4e7c02f 100644 --- a/ts/components/session/settings/section/CategoryPrivacy.tsx +++ b/ts/components/session/settings/section/CategoryPrivacy.tsx @@ -2,6 +2,7 @@ import React from 'react'; // tslint:disable-next-line: no-submodule-imports import useUpdate from 'react-use/lib/useUpdate'; import { sessionPassword, updateConfirmModal } from '../../../../state/ducks/modalDialog'; +import { toggleMessageRequests } from '../../../../state/ducks/userConfig'; import { PasswordAction } from '../../../dialog/SessionPasswordDialog'; import { SessionButtonColor } from '../../SessionButton'; import { SessionSettingButtonItem, SessionToggleWithDescription } from '../SessionSettingListItem'; @@ -107,6 +108,17 @@ export const SettingsCategoryPrivacy = (props: { description={window.i18n('autoUpdateSettingDescription')} active={Boolean(window.getSettingValue(settingsAutoUpdate))} /> + { + // const old = Boolean(window.getSettingValue(settingsAutoUpdate)); + // window.setSettingValue(settingsAutoUpdate, !old); + window.inboxStore?.dispatch(toggleMessageRequests()); + forceUpdate(); + }} + title={window.i18n('messageRequests')} + description={window.i18n('messageRequestsDescription')} + active={Boolean(window.getSettingValue(settingsAutoUpdate))} + /> {!props.hasPassword && (