Fix: update posts rendered in notifs on refresh (close #1196) (#1243)

This commit is contained in:
Paul Frazee 2023-08-22 16:36:49 -07:00 committed by GitHub
parent fcea27ea0b
commit 54706a0437
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 6 deletions

View file

@ -225,10 +225,22 @@ export class NotificationsFeedItemModel {
}
setAdditionalData(additionalPost: AppBskyFeedDefs.PostView) {
this.additionalPost = PostThreadModel.fromPostView(
this.rootStore,
additionalPost,
)
if (this.additionalPost) {
this.additionalPost._replaceAll({
success: true,
headers: {},
data: {
thread: {
post: additionalPost,
},
},
})
} else {
this.additionalPost = PostThreadModel.fromPostView(
this.rootStore,
additionalPost,
)
}
}
}