Browse Source
stop the sync when opening the Clean/Reset modals
develop
Gaëtan Renaudeau
6 years ago
No known key found for this signature in database
GPG Key ID: 7B66B85F042E5451
3 changed files with
10 additions and
2 deletions
-
src/components/SettingsPage/CleanButton.js
-
src/components/SettingsPage/ResetButton.js
-
src/components/base/Modal/ConfirmModal.js
|
|
@ -6,6 +6,7 @@ import { translate } from 'react-i18next' |
|
|
|
import logger from 'logger' |
|
|
|
import type { T } from 'types/common' |
|
|
|
import { cleanAccountsCache } from 'actions/accounts' |
|
|
|
import SyncSkipUnderPriority from 'components/SyncSkipUnderPriority' |
|
|
|
import Button from 'components/base/Button' |
|
|
|
import ConfirmModal from 'components/base/Modal/ConfirmModal' |
|
|
|
import { softReset } from 'helpers/reset' |
|
|
@ -69,7 +70,9 @@ class CleanButton extends PureComponent<Props, State> { |
|
|
|
title={t('settings.softResetModal.title')} |
|
|
|
subTitle={t('common.areYouSure')} |
|
|
|
desc={t('settings.softResetModal.desc')} |
|
|
|
/> |
|
|
|
> |
|
|
|
<SyncSkipUnderPriority priority={999} /> |
|
|
|
</ConfirmModal> |
|
|
|
|
|
|
|
<ResetFallbackModal isOpened={fallbackOpened} onClose={this.closeFallback} /> |
|
|
|
</Fragment> |
|
|
|
|
|
@ -7,6 +7,7 @@ import { translate } from 'react-i18next' |
|
|
|
import logger from 'logger' |
|
|
|
import type { T } from 'types/common' |
|
|
|
import { hardReset } from 'helpers/reset' |
|
|
|
import SyncSkipUnderPriority from 'components/SyncSkipUnderPriority' |
|
|
|
import Box from 'components/base/Box' |
|
|
|
import Button from 'components/base/Button' |
|
|
|
import ConfirmModal from 'components/base/Modal/ConfirmModal' |
|
|
@ -73,7 +74,9 @@ class ResetButton extends PureComponent<Props, State> { |
|
|
|
<IconTriangleWarning width={23} height={21} /> |
|
|
|
</IconWrapperCircle> |
|
|
|
)} |
|
|
|
/> |
|
|
|
> |
|
|
|
<SyncSkipUnderPriority priority={999} /> |
|
|
|
</ConfirmModal> |
|
|
|
|
|
|
|
<ResetFallbackModal isOpened={fallbackOpened} onClose={this.closeFallback} /> |
|
|
|
</Fragment> |
|
|
|
|
|
@ -50,6 +50,7 @@ class ConfirmModal extends PureComponent<Props> { |
|
|
|
t, |
|
|
|
analyticsName, |
|
|
|
centered, |
|
|
|
children, |
|
|
|
...props |
|
|
|
} = this.props |
|
|
|
|
|
|
@ -91,6 +92,7 @@ class ConfirmModal extends PureComponent<Props> { |
|
|
|
<Box ff="Open Sans" color="smoke" fontSize={4} textAlign="center"> |
|
|
|
{desc} |
|
|
|
</Box> |
|
|
|
{children} |
|
|
|
</Box> |
|
|
|
)} |
|
|
|
/> |
|
|
|