Revert "delay toast after posting (#9208)"
This reverts commit 6414bda252.
This commit is contained in:
@@ -564,33 +564,31 @@ export const ComposePost = ({
|
||||
onPostSuccess?.(postSuccessData)
|
||||
}
|
||||
onClose()
|
||||
setTimeout(() => {
|
||||
Toast.show(
|
||||
<Toast.Outer>
|
||||
<Toast.Icon />
|
||||
<Toast.Text>
|
||||
{thread.posts.length > 1
|
||||
? _(msg`Your posts were sent`)
|
||||
: replyTo
|
||||
? _(msg`Your reply was sent`)
|
||||
: _(msg`Your post was sent`)}
|
||||
</Toast.Text>
|
||||
{postUri && (
|
||||
<Toast.Action
|
||||
label={_(msg`View post`)}
|
||||
onPress={() => {
|
||||
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>
|
||||
</Toast.Action>
|
||||
)}
|
||||
</Toast.Outer>,
|
||||
{type: 'success'},
|
||||
)
|
||||
}, 500)
|
||||
Toast.show(
|
||||
<Toast.Outer>
|
||||
<Toast.Icon />
|
||||
<Toast.Text>
|
||||
{thread.posts.length > 1
|
||||
? _(msg`Your posts were sent`)
|
||||
: replyTo
|
||||
? _(msg`Your reply was sent`)
|
||||
: _(msg`Your post was sent`)}
|
||||
</Toast.Text>
|
||||
{postUri && (
|
||||
<Toast.Action
|
||||
label={_(msg`View post`)}
|
||||
onPress={() => {
|
||||
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>
|
||||
</Toast.Action>
|
||||
)}
|
||||
</Toast.Outer>,
|
||||
{type: 'success'},
|
||||
)
|
||||
}, [
|
||||
_,
|
||||
agent,
|
||||
|
||||
Reference in New Issue
Block a user