Simplify the after-post logic to avoid a UI bug (#1105)

This commit is contained in:
Paul Frazee 2023-08-04 09:26:09 -07:00 committed by GitHub
parent b154d3ea21
commit c4459ec4e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 22 deletions

View file

@ -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()