diff --git a/CHANGELOG.md b/CHANGELOG.md index 567a08393dc..9dfd075f990 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - added: Additional user information fields for Kado OTC orders - added: Apple AdServices integration and reporting - added: KeyboardAccessoryView-based `KavButton` +- changed: Dismissing Password Reminder banner now behaves the same as dismissing the `PasswordReminderModal` - changed: Autocomplete `networkLocation` fields returned from `getTokenDetails` in `EditTokenScene` - changed: `FiatPluginEnterAmountScene` next button to use `KavButton` - changed: `SendScene2` row/card grouping updated diff --git a/src/components/notification/NotificationView.tsx b/src/components/notification/NotificationView.tsx index 7fd06dfcb60..f326f138c72 100644 --- a/src/components/notification/NotificationView.tsx +++ b/src/components/notification/NotificationView.tsx @@ -22,6 +22,7 @@ import { EdgeAnim, fadeIn, fadeOut } from '../common/EdgeAnim' import { styled } from '../hoc/styled' import { PasswordReminderModal } from '../modals/PasswordReminderModal' import { Airship } from '../services/AirshipInstance' +import { updateNotificationInfo } from '../services/NotificationService' import { useTheme } from '../services/ThemeContext' import { MAX_TAB_BAR_HEIGHT, MIN_TAB_BAR_HEIGHT } from '../themed/MenuTabs' import { NotificationCard } from './NotificationCard' @@ -61,9 +62,17 @@ const NotificationViewComponent = (props: Props) => { await showBackupModal({ navigation: navigationDebounced }) }) + // For this specific notification, we overload the close button to also + // directly modify state.ui.passwordReminder.needsPasswordCheck. + // This is fine, because we have extensive logic to re-trigger the password + // reminder when needed, anyway. const handlePasswordReminderClose = useHandler(async () => { - await hideBanner(account, 'pwReminder') + await updateNotificationInfo(account, 'pwReminder', false) + dispatch({ + type: 'PASSWORD_REMINDER/PASSWORD_REMINDER_POSTPONED' + }) }) + const handlePasswordReminderPress = useHandler(async () => { await handlePasswordReminderClose() await Airship.show(bridge => )