From 13b1cc637985f473cce76970f732d2962c76c932 Mon Sep 17 00:00:00 2001 From: Hailey Date: Mon, 26 Aug 2024 00:21:10 -0700 Subject: [PATCH] add a preference --- .../BackgroundNotificationHandlerProvider.tsx | 1 + ...ExpoBackgroundNotificationHandler.types.ts | 1 + src/screens/Messages/Settings.tsx | 30 +++++++++++++++++++ 3 files changed, 32 insertions(+) diff --git a/modules/expo-background-notification-handler/src/BackgroundNotificationHandlerProvider.tsx b/modules/expo-background-notification-handler/src/BackgroundNotificationHandlerProvider.tsx index 6ecdd1d476..e85834cdbf 100644 --- a/modules/expo-background-notification-handler/src/BackgroundNotificationHandlerProvider.tsx +++ b/modules/expo-background-notification-handler/src/BackgroundNotificationHandlerProvider.tsx @@ -25,6 +25,7 @@ export function BackgroundNotificationPreferencesProvider({ const [preferences, setPreferences] = React.useState({ playSoundChat: true, + showAvatarChat: false, // @TODO probably want this to default to true }) React.useEffect(() => { diff --git a/modules/expo-background-notification-handler/src/ExpoBackgroundNotificationHandler.types.ts b/modules/expo-background-notification-handler/src/ExpoBackgroundNotificationHandler.types.ts index b74148db48..267deaaad9 100644 --- a/modules/expo-background-notification-handler/src/ExpoBackgroundNotificationHandler.types.ts +++ b/modules/expo-background-notification-handler/src/ExpoBackgroundNotificationHandler.types.ts @@ -38,4 +38,5 @@ export type ExpoBackgroundNotificationHandlerModule = { // Don't add them until the native logic also handles the notifications for those preference types. export type BackgroundNotificationHandlerPreferences = { playSoundChat: boolean + showAvatarChat: boolean } diff --git a/src/screens/Messages/Settings.tsx b/src/screens/Messages/Settings.tsx index b1c52582f0..cae1811307 100644 --- a/src/screens/Messages/Settings.tsx +++ b/src/screens/Messages/Settings.tsx @@ -146,6 +146,36 @@ export function MessagesSettingsScreen({}: Props) { + + Notification Sounds + + + + + + + Show + + + + + + Hide + + + + + )}