Stop the user from posting before the link card finishes loading (#2328)
* Stop the user from posting before the link card finishes loading * Add localization of error messages
This commit is contained in:
parent
e27ffc850a
commit
3b240db0c0
7 changed files with 96 additions and 44 deletions
|
@ -207,7 +207,11 @@ export const ComposePost = observer(function ComposePost({
|
|||
setError('')
|
||||
|
||||
if (richtext.text.trim().length === 0 && gallery.isEmpty && !extLink) {
|
||||
setError('Did you want to say anything?')
|
||||
setError(_(msg`Did you want to say anything?`))
|
||||
return
|
||||
}
|
||||
if (extLink?.isLoading) {
|
||||
setError(_(msg`Please wait for your link card to finish loading`))
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -438,7 +442,7 @@ export const ComposePost = observer(function ComposePost({
|
|||
accessibilityLabel={_(msg`Add link card`)}
|
||||
accessibilityHint={`Creates a card with a thumbnail. The card links to ${url}`}>
|
||||
<Text style={pal.text}>
|
||||
<Trans>Add link card:</Trans>
|
||||
<Trans>Add link card:</Trans>{' '}
|
||||
<Text style={[pal.link, s.ml5]}>{toShortUrl(url)}</Text>
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue