handle appview errors after quote posts
This commit is contained in:
@@ -1213,7 +1213,7 @@ export const ComposePost = ({
|
|||||||
if (initQuote) {
|
if (initQuote) {
|
||||||
// We want to wait for the quote count to update before we call `onPost`, which will refetch data
|
// We want to wait for the quote count to update before we call `onPost`, which will refetch data
|
||||||
void whenAppViewReady(client, initQuote.uri, res => {
|
void whenAppViewReady(client, initQuote.uri, res => {
|
||||||
const anchor = res.thread.at(0)
|
const anchor = res?.thread.at(0)
|
||||||
if (
|
if (
|
||||||
bsky.isType(app.bsky.unspecced.defs.threadItemPost, anchor?.value) &&
|
bsky.isType(app.bsky.unspecced.defs.threadItemPost, anchor?.value) &&
|
||||||
anchor.value.post.quoteCount !== initQuote.quoteCount
|
anchor.value.post.quoteCount !== initQuote.quoteCount
|
||||||
@@ -2478,7 +2478,9 @@ function useKeyboardVerticalOffset() {
|
|||||||
async function whenAppViewReady(
|
async function whenAppViewReady(
|
||||||
client: Client,
|
client: Client,
|
||||||
uri: string,
|
uri: string,
|
||||||
fn: (res: app.bsky.unspecced.getPostThreadV2.$OutputBody) => boolean,
|
fn: (
|
||||||
|
res: app.bsky.unspecced.getPostThreadV2.$OutputBody | undefined,
|
||||||
|
) => boolean,
|
||||||
) {
|
) {
|
||||||
await until(
|
await until(
|
||||||
5, // 5 tries
|
5, // 5 tries
|
||||||
|
|||||||
Reference in New Issue
Block a user