delay toast after posting (#9208)
This commit is contained in:
@@ -564,31 +564,33 @@ export const ComposePost = ({
|
|||||||
onPostSuccess?.(postSuccessData)
|
onPostSuccess?.(postSuccessData)
|
||||||
}
|
}
|
||||||
onClose()
|
onClose()
|
||||||
Toast.show(
|
setTimeout(() => {
|
||||||
<Toast.Outer>
|
Toast.show(
|
||||||
<Toast.Icon />
|
<Toast.Outer>
|
||||||
<Toast.Text>
|
<Toast.Icon />
|
||||||
{thread.posts.length > 1
|
<Toast.Text>
|
||||||
? _(msg`Your posts were sent`)
|
{thread.posts.length > 1
|
||||||
: replyTo
|
? _(msg`Your posts were sent`)
|
||||||
? _(msg`Your reply was sent`)
|
: replyTo
|
||||||
: _(msg`Your post was sent`)}
|
? _(msg`Your reply was sent`)
|
||||||
</Toast.Text>
|
: _(msg`Your post was sent`)}
|
||||||
{postUri && (
|
</Toast.Text>
|
||||||
<Toast.Action
|
{postUri && (
|
||||||
label={_(msg`View post`)}
|
<Toast.Action
|
||||||
onPress={() => {
|
label={_(msg`View post`)}
|
||||||
const {host: name, rkey} = new AtUri(postUri)
|
onPress={() => {
|
||||||
navigation.navigate('PostThread', {name, rkey})
|
const {host: name, rkey} = new AtUri(postUri)
|
||||||
}}>
|
navigation.navigate('PostThread', {name, rkey})
|
||||||
<Trans context="Action to view the post the user just created">
|
}}>
|
||||||
View
|
<Trans context="Action to view the post the user just created">
|
||||||
</Trans>
|
View
|
||||||
</Toast.Action>
|
</Trans>
|
||||||
)}
|
</Toast.Action>
|
||||||
</Toast.Outer>,
|
)}
|
||||||
{type: 'success'},
|
</Toast.Outer>,
|
||||||
)
|
{type: 'success'},
|
||||||
|
)
|
||||||
|
}, 500)
|
||||||
}, [
|
}, [
|
||||||
_,
|
_,
|
||||||
agent,
|
agent,
|
||||||
|
|||||||
Reference in New Issue
Block a user