Apply surfdude29's suggestions from code review
Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
6ce9f47d01
commit
c493d25e65
@@ -49,18 +49,42 @@ export function RejectMenu({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onError: () => {
|
onError: () => {
|
||||||
Toast.show(_(msg`Failed to delete chat`), 'xmark')
|
Toast.show(
|
||||||
|
_(
|
||||||
|
msg({
|
||||||
|
context: 'toast',
|
||||||
|
message: 'Failed to delete chat',
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
'xmark',
|
||||||
|
);
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
const [queueBlock] = useProfileBlockMutationQueue(shadowedProfile)
|
const [queueBlock] = useProfileBlockMutationQueue(shadowedProfile)
|
||||||
|
|
||||||
const onPressDelete = useCallback(() => {
|
const onPressDelete = useCallback(() => {
|
||||||
Toast.show(_(msg`Chat deleted`), 'check')
|
Toast.show(
|
||||||
|
_(
|
||||||
|
msg({
|
||||||
|
context: 'toast',
|
||||||
|
message: 'Chat deleted',
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
'check',
|
||||||
|
);
|
||||||
leaveConvo()
|
leaveConvo()
|
||||||
}, [leaveConvo, _])
|
}, [leaveConvo, _])
|
||||||
|
|
||||||
const onPressBlock = useCallback(() => {
|
const onPressBlock = useCallback(() => {
|
||||||
Toast.show(_(msg`Account blocked`), 'check')
|
Toast.show(
|
||||||
|
_(
|
||||||
|
msg({
|
||||||
|
context: 'toast',
|
||||||
|
message: 'Account blocked',
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
'check',
|
||||||
|
);
|
||||||
// block and also delete convo
|
// block and also delete convo
|
||||||
queueBlock()
|
queueBlock()
|
||||||
leaveConvo()
|
leaveConvo()
|
||||||
@@ -179,7 +203,15 @@ export function AcceptChatButton({
|
|||||||
// no difference if the request failed - when they send a message, the convo will be accepted
|
// no difference if the request failed - when they send a message, the convo will be accepted
|
||||||
// automatically. The only difference is that when they back out of the convo (without sending a message), the conversation will be rejected.
|
// automatically. The only difference is that when they back out of the convo (without sending a message), the conversation will be rejected.
|
||||||
// the list will still have this chat in it -sfn
|
// the list will still have this chat in it -sfn
|
||||||
Toast.show(_(msg`Failed to accept chat`), 'xmark')
|
Toast.show(
|
||||||
|
_(
|
||||||
|
msg({
|
||||||
|
context: 'toast',
|
||||||
|
message: 'Failed to accept chat',
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
'xmark',
|
||||||
|
);
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -230,12 +262,28 @@ export function DeleteChatButton({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onError: () => {
|
onError: () => {
|
||||||
Toast.show(_(msg`Failed to delete chat`), 'xmark')
|
Toast.show(
|
||||||
|
_(
|
||||||
|
msg({
|
||||||
|
context: 'toast',
|
||||||
|
message: 'Failed to delete chat',
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
'xmark',
|
||||||
|
);
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const onPressDelete = useCallback(() => {
|
const onPressDelete = useCallback(() => {
|
||||||
Toast.show(_(msg`Chat deleted`), 'check')
|
Toast.show(
|
||||||
|
_(
|
||||||
|
msg({
|
||||||
|
context: 'toast',
|
||||||
|
message: 'Chat deleted',
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
'check',
|
||||||
|
);
|
||||||
leaveConvo()
|
leaveConvo()
|
||||||
}, [leaveConvo, _])
|
}, [leaveConvo, _])
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,13 @@ export function StepDetails() {
|
|||||||
onChangeText={text => dispatch({type: 'SetName', name: text})}
|
onChangeText={text => dispatch({type: 'SetName', name: text})}
|
||||||
/>
|
/>
|
||||||
<TextField.SuffixText
|
<TextField.SuffixText
|
||||||
label={_(msg`${state.name?.length} out of 50`)}>
|
label={_(
|
||||||
|
msg({
|
||||||
|
comment:
|
||||||
|
'Accessibility label describing how many characters the user has entered out of a 50-character limit in a text input field',
|
||||||
|
message: '${state.name?.length} out of 50',
|
||||||
|
}),
|
||||||
|
)}>
|
||||||
<Text style={[t.atoms.text_contrast_medium]}>
|
<Text style={[t.atoms.text_contrast_medium]}>
|
||||||
{state.name?.length ?? 0}/50
|
{state.name?.length ?? 0}/50
|
||||||
</Text>
|
</Text>
|
||||||
|
|||||||
Reference in New Issue
Block a user