Handle AppView errors after quote posts (#11579)

This commit is contained in:
Samuel Newman
2026-08-27 19:06:58 +03:00
committed by GitHub
parent cfd6d1e07e
commit 41f2d203c3
+4 -2
View File
@@ -1213,7 +1213,7 @@ export const ComposePost = ({
if (initQuote) {
// We want to wait for the quote count to update before we call `onPost`, which will refetch data
void whenAppViewReady(client, initQuote.uri, res => {
const anchor = res.thread.at(0)
const anchor = res?.thread.at(0)
if (
bsky.isType(app.bsky.unspecced.defs.threadItemPost, anchor?.value) &&
anchor.value.post.quoteCount !== initQuote.quoteCount
@@ -2478,7 +2478,9 @@ function useKeyboardVerticalOffset() {
async function whenAppViewReady(
client: Client,
uri: string,
fn: (res: app.bsky.unspecced.getPostThreadV2.$OutputBody) => boolean,
fn: (
res: app.bsky.unspecced.getPostThreadV2.$OutputBody | undefined,
) => boolean,
) {
await until(
5, // 5 tries