add a preference
This commit is contained in:
+1
@@ -25,6 +25,7 @@ export function BackgroundNotificationPreferencesProvider({
|
|||||||
const [preferences, setPreferences] =
|
const [preferences, setPreferences] =
|
||||||
React.useState<BackgroundNotificationHandlerPreferences>({
|
React.useState<BackgroundNotificationHandlerPreferences>({
|
||||||
playSoundChat: true,
|
playSoundChat: true,
|
||||||
|
showAvatarChat: false, // @TODO probably want this to default to true
|
||||||
})
|
})
|
||||||
|
|
||||||
React.useEffect(() => {
|
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.
|
// Don't add them until the native logic also handles the notifications for those preference types.
|
||||||
export type BackgroundNotificationHandlerPreferences = {
|
export type BackgroundNotificationHandlerPreferences = {
|
||||||
playSoundChat: boolean
|
playSoundChat: boolean
|
||||||
|
showAvatarChat: boolean
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,6 +146,36 @@ export function MessagesSettingsScreen({}: Props) {
|
|||||||
</Toggle.Item>
|
</Toggle.Item>
|
||||||
</View>
|
</View>
|
||||||
</Toggle.Group>
|
</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>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user