mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
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:
committed by
Greyson Parrelli
parent
d88999d6d4
commit
c1820459b7
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user