diff options
author | Eric Bailey <git@esb.lol> | 2023-08-24 18:26:29 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-24 16:26:29 -0700 |
commit | 4654a9a45e68eeba289f2f35473fb2af60e754e2 (patch) | |
tree | 344ded1d3ff63def5f64c00c3abcee4258fad12f /src/state/models/feeds/posts.ts | |
parent | a5981e127f7e4e2a5ba44717b91b26161adc0a5e (diff) | |
download | voidsky-4654a9a45e68eeba289f2f35473fb2af60e754e2.tar.zst |
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 <pfrazee@gmail.com>
Diffstat (limited to 'src/state/models/feeds/posts.ts')
-rw-r--r-- | src/state/models/feeds/posts.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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}) |