Add support for remote feature flags.

This commit is contained in:
Greyson Parrelli
2019-12-19 17:41:21 -05:00
parent b8602ee004
commit 55e9f8722f
33 changed files with 403 additions and 58 deletions

View File

@@ -61,7 +61,7 @@ public class FromTextView extends EmojiTextView {
if (recipient.isLocalNumber()) {
builder.append(getContext().getString(R.string.note_to_self));
} else if (!FeatureFlags.PROFILE_DISPLAY && recipient.getName(getContext()) == null && !recipient.getProfileName().isEmpty()) {
} else if (!FeatureFlags.profileDisplay() && recipient.getName(getContext()) == null && !recipient.getProfileName().isEmpty()) {
SpannableString profileName = new SpannableString(" (~" + recipient.getProfileName().toString() + ") ");
profileName.setSpan(new CenterAlignedRelativeSizeSpan(0.75f), 0, profileName.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
profileName.setSpan(new TypefaceSpan("sans-serif-light"), 0, profileName.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);

View File

@@ -370,7 +370,7 @@ public class WebRtcCallScreen extends FrameLayout implements RecipientForeverObs
.diskCacheStrategy(DiskCacheStrategy.ALL)
.into(this.photo);
if (FeatureFlags.PROFILE_DISPLAY) {
if (FeatureFlags.profileDisplay()) {
this.name.setText(recipient.getDisplayName(getContext()));
if (recipient.getE164().isPresent()) {