add a preference
This commit is contained in:
+1
@@ -25,6 +25,7 @@ export function BackgroundNotificationPreferencesProvider({
|
||||
const [preferences, setPreferences] =
|
||||
React.useState<BackgroundNotificationHandlerPreferences>({
|
||||
playSoundChat: true,
|
||||
showAvatarChat: false, // @TODO probably want this to default to true
|
||||
})
|
||||
|
||||
React.useEffect(() => {
|
||||
|
||||
+1
@@ -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
|
||||
}
|
||||
|
||||
@@ -146,6 +146,36 @@ export function MessagesSettingsScreen({}: Props) {
|
||||
</Toggle.Item>
|
||||
</View>
|
||||
</Toggle.Group>
|
||||
<Text style={[a.text_lg, a.font_bold]}>
|
||||
<Trans>Notification Sounds</Trans>
|
||||
</Text>
|
||||
<Divider style={a.my_md} />
|
||||
<Toggle.Group
|
||||
label={_(msg`Show avatars`)}
|
||||
type="radio"
|
||||
values={[preferences.showAvatarChat ? 'enabled' : 'disabled']}
|
||||
onChange={onSelectSoundSetting}>
|
||||
<View>
|
||||
<Toggle.Item
|
||||
name="show"
|
||||
label={_(msg`Show`)}
|
||||
style={[a.justify_between, a.py_sm]}>
|
||||
<Toggle.LabelText>
|
||||
<Trans>Show</Trans>
|
||||
</Toggle.LabelText>
|
||||
<Toggle.Radio />
|
||||
</Toggle.Item>
|
||||
<Toggle.Item
|
||||
name="hide"
|
||||
label={_(msg`Hide`)}
|
||||
style={[a.justify_between, a.py_sm]}>
|
||||
<Toggle.LabelText>
|
||||
<Trans>Hide</Trans>
|
||||
</Toggle.LabelText>
|
||||
<Toggle.Radio />
|
||||
</Toggle.Item>
|
||||
</View>
|
||||
</Toggle.Group>
|
||||
</>
|
||||
)}
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user