Fix to "Load new posts" showing sometimes when there's nothing new to show (#1191)
* Fix to feed item react key value (hopefully) * Fix false-firing of load more (close #1028)
This commit is contained in:
parent
b0282865fa
commit
884e5c9294
2 changed files with 12 additions and 3 deletions
|
@ -263,7 +263,16 @@ export class PostsFeedModel {
|
|||
return
|
||||
}
|
||||
const res = await this._getFeed({limit: 1})
|
||||
this.setHasNewLatest(res.data.feed[0]?.post.uri !== this.pollCursor)
|
||||
if (res.data.feed[0]) {
|
||||
const slices = this.tuner.tune(res.data.feed, this.feedTuners)
|
||||
if (slices[0]) {
|
||||
const sliceModel = new PostsFeedSliceModel(this.rootStore, slices[0])
|
||||
if (sliceModel.moderation.content.filter) {
|
||||
return
|
||||
}
|
||||
this.setHasNewLatest(sliceModel.uri !== this.pollCursor)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue