Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

use same visuals for notification sounds setting as the allow messages from (#4141)

authored by

Hailey and committed by
GitHub
5bbb5f58 8be65a87

+41 -15
+41 -15
src/screens/Messages/Settings.tsx
··· 35 35 }, 36 36 }) 37 37 38 - const onSelectItem = useCallback( 38 + const onSelectMessagesFrom = useCallback( 39 39 (keys: string[]) => { 40 40 const key = keys[0] 41 41 if (!key) return ··· 44 44 [updateDeclaration], 45 45 ) 46 46 47 + const onSelectSoundSetting = useCallback( 48 + (keys: string[]) => { 49 + const key = keys[0] 50 + if (!key) return 51 + setPref('playSoundChat', key === 'enabled') 52 + }, 53 + [setPref], 54 + ) 55 + 47 56 return ( 48 57 <CenteredView sideBorders style={a.h_full_vh}> 49 58 <ViewHeader title={_(msg`Settings`)} showOnDesktop showBorder /> ··· 58 67 (profile?.associated?.chat?.allowIncoming as AllowIncoming) ?? 59 68 'following', 60 69 ]} 61 - onChange={onSelectItem}> 70 + onChange={onSelectMessagesFrom}> 62 71 <View> 63 72 <Toggle.Item 64 73 name="all" ··· 91 100 </Toggle.Group> 92 101 {isNative && ( 93 102 <> 94 - <Divider style={[a.my_lg]} /> 95 - <Toggle.Item 96 - name="playSoundChat" 97 - label={_(msg`Play notification sounds`)} 98 - value={preferences.playSoundChat} 99 - onChange={() => { 100 - setPref('playSoundChat', !preferences.playSoundChat) 101 - }}> 102 - <Toggle.Checkbox /> 103 - <Toggle.LabelText> 104 - <Trans>Play notification sounds</Trans> 105 - </Toggle.LabelText> 106 - </Toggle.Item> 103 + <Divider /> 104 + <Text style={[a.text_lg, a.font_bold]}> 105 + <Trans>Notification Sounds</Trans> 106 + </Text> 107 + <Toggle.Group 108 + label={_(msg`Notification sounds`)} 109 + type="radio" 110 + values={[preferences.playSoundChat ? 'enabled' : 'disabled']} 111 + onChange={onSelectSoundSetting}> 112 + <View> 113 + <Toggle.Item 114 + name="enabled" 115 + label={_(msg`Enabled`)} 116 + style={[a.justify_between, a.py_sm]}> 117 + <Toggle.LabelText> 118 + <Trans>Enabled</Trans> 119 + </Toggle.LabelText> 120 + <Toggle.Radio /> 121 + </Toggle.Item> 122 + <Toggle.Item 123 + name="disabled" 124 + label={_(msg`Disabled`)} 125 + style={[a.justify_between, a.py_sm]}> 126 + <Toggle.LabelText> 127 + <Trans>Disabled</Trans> 128 + </Toggle.LabelText> 129 + <Toggle.Radio /> 130 + </Toggle.Item> 131 + </View> 132 + </Toggle.Group> 107 133 </> 108 134 )} 109 135 </View>