Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Paul Frazee and committed by
GitHub
54706a04 fcea27ea

+21 -6
+16 -4
src/state/models/feeds/notifications.ts
··· 225 225 } 226 226 227 227 setAdditionalData(additionalPost: AppBskyFeedDefs.PostView) { 228 - this.additionalPost = PostThreadModel.fromPostView( 229 - this.rootStore, 230 - additionalPost, 231 - ) 228 + if (this.additionalPost) { 229 + this.additionalPost._replaceAll({ 230 + success: true, 231 + headers: {}, 232 + data: { 233 + thread: { 234 + post: additionalPost, 235 + }, 236 + }, 237 + }) 238 + } else { 239 + this.additionalPost = PostThreadModel.fromPostView( 240 + this.rootStore, 241 + additionalPost, 242 + ) 243 + } 232 244 } 233 245 } 234 246
+5 -2
src/view/com/post/Post.tsx
··· 51 51 52 52 useEffect(() => { 53 53 if (initView || view?.params.uri === uri) { 54 - return // no change needed? or trigger refresh? 54 + if (initView !== view) { 55 + setView(initView) 56 + } 57 + return 55 58 } 56 59 const newView = new PostThreadModel(store, {uri, depth: 0}) 57 60 setView(newView) 58 61 newView.setup().catch(err => store.log.error('Failed to fetch post', err)) 59 - }, [initView, uri, view?.params.uri, store]) 62 + }, [initView, setView, uri, view, view?.params.uri, store]) 60 63 61 64 // deleted 62 65 // =