about summary refs log tree commit diff
path: root/src/state/models/feed-view.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/models/feed-view.ts')
-rw-r--r--src/state/models/feed-view.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/state/models/feed-view.ts b/src/state/models/feed-view.ts
index ed5a32d8f..fe0943018 100644
--- a/src/state/models/feed-view.ts
+++ b/src/state/models/feed-view.ts
@@ -7,6 +7,7 @@ import {
 } from '@atproto/api'
 import AwaitLock from 'await-lock'
 import {bundleAsync} from 'lib/async/bundle'
+import sampleSize from 'lodash.samplesize'
 type FeedViewPost = AppBskyFeedFeedViewPost.Main
 type ReasonRepost = AppBskyFeedFeedViewPost.ReasonRepost
 type PostView = AppBskyFeedPost.View
@@ -425,7 +426,7 @@ export class FeedModel {
    * Check if new posts are available
    */
   async checkForLatest() {
-    if (this.hasNewLatest) {
+    if (this.hasNewLatest || this.rootStore.me.follows.isEmpty) {
       return
     }
     const res = await this._getFeed({limit: 1})
@@ -565,7 +566,10 @@ export class FeedModel {
       if (this.rootStore.me.follows.isEmpty) {
         const responses = await getMultipleAuthorsPosts(
           this.rootStore,
-          SUGGESTED_FOLLOWS(String(this.rootStore.agent.service)),
+          sampleSize(
+            SUGGESTED_FOLLOWS(String(this.rootStore.agent.service)),
+            20,
+          ),
           params.before,
           20,
         )