mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 17:06:31 -06:00
FIX: Automatically load more reviewable items. (#13069)
If you finished reviewing the initially loaded items, and there're more in the queue, load them. Also, when fast-tracking the pending items updates, use the reviewable_count returned by the perform result. Calling "result.reviewable_count" returns undefines.
This commit is contained in:
parent
4c26dd09e4
commit
8801a27cc6
@ -138,7 +138,10 @@ export default Component.extend({
|
||||
|
||||
// "fast track" to update the current user's reviewable count before the message bus finds out.
|
||||
if (performResult.reviewable_count !== undefined) {
|
||||
this.currentUser.set("reviewable_count", result.reviewable_count);
|
||||
this.currentUser.set(
|
||||
"reviewable_count",
|
||||
performResult.reviewable_count
|
||||
);
|
||||
}
|
||||
|
||||
if (this.attrs.remove) {
|
||||
|
@ -102,7 +102,12 @@ export default Controller.extend({
|
||||
let newList = this.reviewables.reject((reviewable) => {
|
||||
return ids.indexOf(reviewable.id) !== -1;
|
||||
});
|
||||
this.set("reviewables", newList);
|
||||
|
||||
if (newList.length === 0) {
|
||||
this.send("refreshRoute");
|
||||
} else {
|
||||
this.set("reviewables", newList);
|
||||
}
|
||||
},
|
||||
|
||||
resetTopic() {
|
||||
|
Loading…
Reference in New Issue
Block a user