Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 10 additions & 1 deletion src/components/notification/NotificationView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 => <PasswordReminderModal bridge={bridge} navigation={navigationDebounced} />)
Expand Down
Loading