reset nudge in settings

This commit is contained in:
Samuel Newman
2025-06-27 20:13:05 +03:00
parent 53d5680d19
commit 75e716a11a
+15
View File
@@ -64,6 +64,7 @@ import {
shouldShowVerificationCheckButton, shouldShowVerificationCheckButton,
VerificationCheckButton, VerificationCheckButton,
} from '#/components/verification/VerificationCheckButton' } from '#/components/verification/VerificationCheckButton'
import {useActivitySubscriptionsNudged} from '#/storage/hooks/activity-subscriptions-nudged'
type Props = NativeStackScreenProps<CommonNavigatorParams, 'Settings'> type Props = NativeStackScreenProps<CommonNavigatorParams, 'Settings'>
export function SettingsScreen({}: Props) { export function SettingsScreen({}: Props) {
@@ -364,6 +365,7 @@ function DevOptions() {
const onboardingDispatch = useOnboardingDispatch() const onboardingDispatch = useOnboardingDispatch()
const navigation = useNavigation<NavigationProp>() const navigation = useNavigation<NavigationProp>()
const {mutate: deleteChatDeclarationRecord} = useDeleteActorDeclaration() const {mutate: deleteChatDeclarationRecord} = useDeleteActorDeclaration()
const [actyNotifNudged, setActyNotifNudged] = useActivitySubscriptionsNudged()
const resetOnboarding = async () => { const resetOnboarding = async () => {
navigation.navigate('Home') navigation.navigate('Home')
@@ -387,6 +389,10 @@ function DevOptions() {
Toast.show(_(msg`You probably want to restart the app now.`)) Toast.show(_(msg`You probably want to restart the app now.`))
} }
const onPressActySubsUnNudge = () => {
setActyNotifNudged(false)
}
return ( return (
<> <>
<SettingsList.PressableItem <SettingsList.PressableItem
@@ -431,6 +437,15 @@ function DevOptions() {
<Trans>Unsnooze email reminder</Trans> <Trans>Unsnooze email reminder</Trans>
</SettingsList.ItemText> </SettingsList.ItemText>
</SettingsList.PressableItem> </SettingsList.PressableItem>
{actyNotifNudged && (
<SettingsList.PressableItem
onPress={onPressActySubsUnNudge}
label={_(msg`Reset activity subscription nudge`)}>
<SettingsList.ItemText>
<Trans>Reset activity subscription nudge</Trans>
</SettingsList.ItemText>
</SettingsList.PressableItem>
)}
<SettingsList.PressableItem <SettingsList.PressableItem
onPress={() => clearAllStorage()} onPress={() => clearAllStorage()}
label={_(msg`Clear all storage data`)}> label={_(msg`Clear all storage data`)}>