Grab-bag of post-feed improvements (#2140)
* Sanity check against cases where empty pages may occur * Use the mergefeed as an emergency fallback to an empty feed * Check for new posts on focus
This commit is contained in:
parent
52a0cb8fac
commit
040ce03215
5 changed files with 24 additions and 6 deletions
|
@ -29,7 +29,7 @@ export class MergeFeedAPI implements FeedAPI {
|
|||
this.feedCursor = 0
|
||||
this.itemCursor = 0
|
||||
this.sampleCursor = 0
|
||||
if (this.params.mergeFeedEnabled && this.params.mergeFeedSources) {
|
||||
if (this.params.mergeFeedSources) {
|
||||
this.customFeeds = shuffle(
|
||||
this.params.mergeFeedSources.map(
|
||||
feedUri => new MergeFeedSource_Custom(feedUri, this.feedTuners),
|
||||
|
@ -108,7 +108,10 @@ export class MergeFeedAPI implements FeedAPI {
|
|||
|
||||
// this condition establishes the frequency that custom feeds are woven into follows
|
||||
const shouldSample =
|
||||
i >= 15 && candidateFeeds.length >= 2 && (i % 4 === 0 || i % 5 === 0)
|
||||
this.params.mergeFeedEnabled &&
|
||||
i >= 15 &&
|
||||
candidateFeeds.length >= 2 &&
|
||||
(i % 4 === 0 || i % 5 === 0)
|
||||
|
||||
if (!canSample && !hasFollows) {
|
||||
// no data available
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue