Prevent system from displaying -1 other groups in common when there is 0 group in common.

This commit is contained in:
lisa-signal
2025-06-27 16:08:13 -04:00
committed by Greyson Parrelli
parent b98e09aedd
commit 3b0878f493

View File

@@ -87,6 +87,7 @@ public class ReviewCardViewModel extends ViewModel {
@WorkerThread
private @NonNull List<ReviewCard> transformReviewRecipients(boolean isSelfGroupAdmin, @NonNull List<ReviewRecipient> reviewRecipients) {
return Stream.of(reviewRecipients)
.filter(r -> repository.loadGroupsInCommonCount(r) > 0)
.map(r -> new ReviewCard(r,
repository.loadGroupsInCommonCount(r) - (isGroupThread ? 1 : 0),
getCardType(r),