reset nudge in settings
This commit is contained in:
@@ -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`)}>
|
||||||
|
|||||||
Reference in New Issue
Block a user