FIX: Prevent group requests from loading infinitely (#28544)

In GroupRequestsController, request_count is incorrectly written as
user_count, which causes group member requests to be loaded infinitely
when user_count is greater than request_count.
This commit is contained in:
锦心 2024-08-26 17:54:30 +08:00 committed by GitHub
parent 3eb7aa866c
commit a2dbade55d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -16,7 +16,9 @@ export default class GroupRequestsController extends Controller {
loading = false; loading = false;
get canLoadMore() { get canLoadMore() {
return this.get("model.requesters")?.length < this.get("model.user_count"); return (
this.get("model.requesters")?.length < this.get("model.request_count")
);
} }
@observes("filterInput") @observes("filterInput")

View File

@ -19,7 +19,7 @@ acceptance("Group Requests", function (needs) {
id: 42, id: 42,
automatic: false, automatic: false,
name: "Macdonald", name: "Macdonald",
user_count: 1, user_count: 10,
mentionable_level: 0, mentionable_level: 0,
messageable_level: 0, messageable_level: 0,
visibility_level: 0, visibility_level: 0,