about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-04-24 20:07:58 -0500
committerGitHub <noreply@github.com>2023-04-24 20:07:58 -0500
commit26cef73b5c84599bcabc0e0f90ff237763c47113 (patch)
tree3cb92d276f6ed816facbfd0c4b57eb5b062b8b29 /src
parentf4da2f444281c8b8f693833d727fc7c7bc85f8ae (diff)
downloadvoidsky-26cef73b5c84599bcabc0e0f90ff237763c47113.tar.zst
If adding the user's post when empty, just refresh (#530)
Diffstat (limited to 'src')
-rw-r--r--src/state/models/feeds/posts.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/state/models/feeds/posts.ts b/src/state/models/feeds/posts.ts
index d33dce192..cbff707d0 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],