Optimistic WIP

This commit is contained in:
Eric Bailey
2025-05-16 09:51:49 -07:00
parent b428f8f93c
commit 4a83579795
3 changed files with 34 additions and 13 deletions
+4
View File
@@ -412,6 +412,10 @@ export const ComposePost = ({
if (res.data.thread.length !== thread.posts.length) {
throw new Error(`Not ready`)
}
const anchor = res.data.thread.at(0)
if (!AppBskyFeedDefs.isThreadItemPost(anchor)) {
throw new Error(`Not ready`)
}
return res.data.thread
}, 1e3)
}
+1
View File
@@ -152,6 +152,7 @@ export function Inner({uri}: {uri: string | undefined}) {
post: AppBskyFeedDefs.ThreadItemPost,
}) => (_: any, posts: AppBskyFeedDefs.ThreadItemPost[]) => {
if (posts.length) {
// TODO get parent and update reply count?
insertReplies(post.uri, posts)
}
}