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>
This commit is contained in:
parent
a5981e127f
commit
4654a9a45e
3 changed files with 40 additions and 37 deletions
|
@ -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})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue