Refactor/es feeds
TODO:
- Re-introduce block client side
- Re-synchronise entities in the background
3/5 threads resolved
mentioned in merge request engine!221 (merged)
added 1 commit
- 9dc4d33a - (fix): use combineLatest to ensure obversables are in sync for hasMore
- Resolved by Mark Harding
96 this.params.sync = 1; 97 } 98 return this; 99 } 69 100 70 // Garbage collection 101 setOffset(offset: number): FeedsService { 102 this.offset.next(offset); 103 return this; 104 } 71 105 72 this.feedsSync.gc(); 73 setTimeout(() => this.feedsSync.gc(), 15 * 60 * 1000); // Every 15 minutes 106 fetch(): FeedsService { 107 this.inProgress.next(true); 108 this.client.get(this.endpoint, {...this.params, ...{ limit: 150 }}) // Over 12 scrolls - Maintainer
Hissssssssss, I hate the spread operator so much. Your call if we use it, but I find it impossible to keep track of what objects we're mapping.
- Resolved by Mark Harding
- Resolved by Mark Harding
125 126 if (this.entities && !refresh) { 127 this.entities.push(...entities); 128 } else { 129 this.entities = entities; 130 } 131 132 if (!next) { 133 this.moreData = false; 134 } 135 136 this.offset = next; 94 95 this.feedsService 96 .setEndpoint(`api/v2/feeds/container/${this.group.guid}/${this.type}`) 97 .setLimit(12) - Maintainer
These 12s should be defined as constants
added MR::Awaiting Review label
added 1 commit
- 50d81326 - (chore): remove unused hydrateEntities component
added 1 commit
- aa37120c - (fix): non-canary users with legacy feeds should scroll
merged