Add note to clarify "allow new messages from" setting (#4166)

zio/stable
Samuel Newman 2024-05-22 15:52:04 +01:00 committed by GitHub
parent 6522ee9bbf
commit 690926dd90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 20 additions and 4 deletions

View File

@ -12,7 +12,7 @@ import {useSession} from '#/state/session'
import * as Toast from '#/view/com/util/Toast'
import {ViewHeader} from '#/view/com/util/ViewHeader'
import {CenteredView} from '#/view/com/util/Views'
import {atoms as a} from '#/alf'
import {atoms as a, useTheme} from '#/alf'
import {Divider} from '#/components/Divider'
import * as Toggle from '#/components/forms/Toggle'
import {Text} from '#/components/Typography'
@ -23,6 +23,7 @@ type AllowIncoming = 'all' | 'none' | 'following'
type Props = NativeStackScreenProps<CommonNavigatorParams, 'MessagesSettings'>
export function MessagesSettingsScreen({}: Props) {
const {_} = useLingui()
const t = useTheme()
const {currentAccount} = useSession()
const {data: profile} = useProfileQuery({
did: currentAccount!.did,
@ -58,10 +59,10 @@ export function MessagesSettingsScreen({}: Props) {
<ViewHeader title={_(msg`Settings`)} showOnDesktop showBorder />
<View style={[a.p_lg, a.gap_md]}>
<Text style={[a.text_lg, a.font_bold]}>
<Trans>Allow messages from</Trans>
<Trans>Allow new messages from</Trans>
</Text>
<Toggle.Group
label={_(msg`Allow messages from`)}
label={_(msg`Allow new messages from`)}
type="radio"
values={[
(profile?.associated?.chat?.allowIncoming as AllowIncoming) ??
@ -98,9 +99,24 @@ export function MessagesSettingsScreen({}: Props) {
</Toggle.Item>
</View>
</Toggle.Group>
<View
style={[
a.mt_sm,
a.px_xl,
a.py_lg,
a.rounded_md,
t.atoms.bg_contrast_25,
]}>
<Text style={[t.atoms.text_contrast_high]}>
<Trans>
You can continue ongoing conversations regardless of which setting
you choose.
</Trans>
</Text>
</View>
{isNative && (
<>
<Divider />
<Divider style={a.my_md} />
<Text style={[a.text_lg, a.font_bold]}>
<Trans>Notification Sounds</Trans>
</Text>