Simplify the after-post logic to avoid a UI bug (#1105)
This commit is contained in:
parent
b154d3ea21
commit
c4459ec4e8
2 changed files with 7 additions and 22 deletions
|
@ -163,9 +163,8 @@ export const ComposePost = observer(function ComposePost({
|
|||
|
||||
setIsProcessing(true)
|
||||
|
||||
let createdPost
|
||||
try {
|
||||
createdPost = await apilib.post(store, {
|
||||
await apilib.post(store, {
|
||||
rawText: rt.text,
|
||||
replyTo: replyTo?.uri,
|
||||
images: gallery.images,
|
||||
|
@ -193,7 +192,7 @@ export const ComposePost = observer(function ComposePost({
|
|||
if (replyTo && replyTo.uri) track('Post:Reply')
|
||||
}
|
||||
if (!replyTo) {
|
||||
await store.me.mainFeed.addPostToTop(createdPost.uri)
|
||||
store.me.mainFeed.onPostCreated()
|
||||
}
|
||||
onPost?.()
|
||||
onClose()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue