From 4654a9a45e68eeba289f2f35473fb2af60e754e2 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 24 Aug 2023 18:26:29 -0500 Subject: defer loading of feeds until visible (#1271) * defer loading of feeds until visible * Fix: use existing hasLoaded * Fix: dont query for latest during initial load --------- Co-authored-by: Paul Frazee --- src/state/models/feeds/posts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/state/models/feeds/posts.ts') diff --git a/src/state/models/feeds/posts.ts b/src/state/models/feeds/posts.ts index 8bc75daa4..15145a203 100644 --- a/src/state/models/feeds/posts.ts +++ b/src/state/models/feeds/posts.ts @@ -272,7 +272,7 @@ export class PostsFeedModel { * Check if new posts are available */ async checkForLatest() { - if (this.hasNewLatest || this.isLoading) { + if (!this.hasLoaded || this.hasNewLatest || this.isLoading) { return } const res = await this._getFeed({limit: 1}) -- cgit 1.4.1