fix: in public course preview, filter non-joined members from participant count (#5812)

This commit is contained in:
ggurdin 2026-02-25 12:19:19 -05:00 committed by GitHub
parent 2a17b401ee
commit 77559b9838
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -105,6 +105,10 @@ class RoomSummaryResponse {
);
}
int get joinedMemberCount => membershipSummary.values
.where((membership) => membership == Membership.join.name)
.length;
factory RoomSummaryResponse.fromJson(Map<String, dynamic> json) {
final planEntry =
json[PangeaEventTypes.activityPlan]?["default"]?["content"];

View file

@ -119,7 +119,7 @@ class PublicCoursePreviewView extends StatelessWidget {
icon: Icons.person,
text: L10n.of(context)
.countParticipants(
summary.membershipSummary.length,
summary.joinedMemberCount,
),
fontSize: descFontSize,
iconSize: smallIconSize,