Review Queue Pagination/Infinite Scrolling after Taking an Action

Let me start by saying I am not familiar with Ember, so I might use the wrong words here and there.

After resolving a reviewable, it is removed from the current list of reviewables by calling reject:

https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/controllers/review-index.js#L107

reject returns an array. When the reviewables variable is set to the newList array (line 114), the class with additional methods like loadMore() is replaced with a basic array. (edit: that is why loading works properly before resolving an item but not after)

A possible fix is to replace this.set("reviewables", newList); with this.reviewables.set("content", newList);.

3 Likes