Implement further features for badges.

* Add Subscriptions API
* Add Accept-Language header to profile requests
* Fix several UI bugs, add error dialogs, etc.
This commit is contained in:
Alex Hart
2021-10-21 16:39:02 -03:00
committed by Greyson Parrelli
parent d88999d6d4
commit c1820459b7
91 changed files with 2765 additions and 696 deletions

View File

@@ -432,7 +432,7 @@ public class Recipient {
this.systemContactName = details.systemContactName;
this.extras = details.extras;
this.hasGroupsInCommon = details.hasGroupsInCommon;
this.badges = FeatureFlags.donorBadges() ? details.badges : Collections.emptyList();
this.badges = details.badges;
}
public @NonNull RecipientId getId() {
@@ -1028,14 +1028,14 @@ public class Recipient {
}
public @NonNull List<Badge> getBadges() {
return badges;
return FeatureFlags.donorBadges() ? badges : Collections.emptyList();
}
public @Nullable Badge getFeaturedBadge() {
if (badges.isEmpty()) {
if (getBadges().isEmpty()) {
return null;
} else {
return badges.get(0);
return getBadges().get(0);
}
}