diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-04-24 20:07:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-24 20:07:58 -0500 |
commit | 26cef73b5c84599bcabc0e0f90ff237763c47113 (patch) | |
tree | 3cb92d276f6ed816facbfd0c4b57eb5b062b8b29 /src/state/models/feeds/posts.ts | |
parent | f4da2f444281c8b8f693833d727fc7c7bc85f8ae (diff) | |
download | voidsky-26cef73b5c84599bcabc0e0f90ff237763c47113.tar.zst |
If adding the user's post when empty, just refresh (#530)
Diffstat (limited to 'src/state/models/feeds/posts.ts')
-rw-r--r-- | src/state/models/feeds/posts.ts | 3 |
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], |