diff --git a/src/components/ageAssurance/AgeRestrictedScreen.tsx b/src/components/ageAssurance/AgeRestrictedScreen.tsx index b47cc5b0c9..1430aaaff9 100644 --- a/src/components/ageAssurance/AgeRestrictedScreen.tsx +++ b/src/components/ageAssurance/AgeRestrictedScreen.tsx @@ -18,10 +18,12 @@ export function AgeRestrictedScreen({ children, screenTitle, infoText, + rightHeaderSlot, }: { children: React.ReactNode screenTitle?: string infoText?: string + rightHeaderSlot?: React.ReactNode }) { const {_} = useLingui() const copy = useAgeAssuranceCopy() @@ -46,12 +48,12 @@ export function AgeRestrictedScreen({ - + {screenTitle ?? Unavailable} - + {rightHeaderSlot ?? } diff --git a/src/lib/notifications/notifications.ts b/src/lib/notifications/notifications.ts index 67a38a52ce..03dc4726f6 100644 --- a/src/lib/notifications/notifications.ts +++ b/src/lib/notifications/notifications.ts @@ -11,6 +11,7 @@ import {isNative} from '#/platform/detection' import {useAgeAssuranceContext} from '#/state/ageAssurance' import {type SessionAccount, useAgent, useSession} from '#/state/session' import BackgroundNotificationHandler from '#/../modules/expo-background-notification-handler' +import {IS_DEV} from '#/env' /** * @private @@ -129,7 +130,7 @@ export function useGetAndRegisterPushToken() { }: { isAgeRestricted?: boolean } = {}) => { - if (!isNative) return + if (!isNative || IS_DEV) return /** * This will also fire the listener added via `addPushTokenListener`. That diff --git a/src/screens/Messages/ChatList.tsx b/src/screens/Messages/ChatList.tsx index 3454464648..cb8598e79c 100644 --- a/src/screens/Messages/ChatList.tsx +++ b/src/screens/Messages/ChatList.tsx @@ -74,7 +74,18 @@ export function MessagesScreen(props: Props) { return ( + infoText={aaCopy.chatsInfoText} + rightHeaderSlot={ + + + Chat settings + + + }> ) diff --git a/src/screens/Messages/Settings.tsx b/src/screens/Messages/Settings.tsx index 6015c07cd5..b4b84aafea 100644 --- a/src/screens/Messages/Settings.tsx +++ b/src/screens/Messages/Settings.tsx @@ -12,8 +12,6 @@ import {useSession} from '#/state/session' import * as Toast from '#/view/com/util/Toast' import {atoms as a} from '#/alf' import {Admonition} from '#/components/Admonition' -import {AgeRestrictedScreen} from '#/components/ageAssurance/AgeRestrictedScreen' -import {useAgeAssuranceCopy} from '#/components/ageAssurance/useAgeAssuranceCopy' import {Divider} from '#/components/Divider' import * as Toggle from '#/components/forms/Toggle' import * as Layout from '#/components/Layout' @@ -25,16 +23,7 @@ type AllowIncoming = 'all' | 'none' | 'following' type Props = NativeStackScreenProps export function MessagesSettingsScreen(props: Props) { - const {_} = useLingui() - const aaCopy = useAgeAssuranceCopy() - - return ( - - - - ) + return } export function MessagesSettingsScreenInner({}: Props) {