From 26cef73b5c84599bcabc0e0f90ff237763c47113 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Mon, 24 Apr 2023 20:07:58 -0500 Subject: [PATCH] If adding the user's post when empty, just refresh (#530) --- src/state/models/feeds/posts.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/state/models/feeds/posts.ts b/src/state/models/feeds/posts.ts index d33dce19..cbff707d 100644 --- a/src/state/models/feeds/posts.ts +++ b/src/state/models/feeds/posts.ts @@ -485,6 +485,9 @@ export class PostsFeedModel { * Used by the composer to add their new posts */ async addPostToTop(uri: string) { + if (!this.slices.length) { + return this.refresh() + } try { const res = await this.rootStore.agent.app.bsky.feed.getPosts({ uris: [uri],