Update Mention UI/UX to match latest designs.

This commit is contained in:
Cody Henthorne
2020-08-13 09:54:33 -04:00
committed by Greyson Parrelli
parent d63e5165eb
commit 724f3e872b
30 changed files with 353 additions and 201 deletions

View File

@@ -318,7 +318,7 @@ public class Recipient {
this.storageId = null;
this.identityKey = null;
this.identityStatus = VerifiedStatus.DEFAULT;
this.mentionSetting = MentionSetting.GLOBAL;
this.mentionSetting = MentionSetting.ALWAYS_NOTIFY;
}
public Recipient(@NonNull RecipientId id, @NonNull RecipientDetails details, boolean resolved) {
@@ -413,6 +413,17 @@ public class Recipient {
return StringUtil.isolateBidi(name);
}
public @NonNull String getMentionDisplayName(@NonNull Context context) {
String name = Util.getFirstNonEmpty(localNumber ? getProfileName().toString() : getName(context),
localNumber ? getName(context) : getProfileName().toString(),
getDisplayUsername(),
e164,
email,
context.getString(R.string.Recipient_unknown));
return StringUtil.isolateBidi(name);
}
public @NonNull String getShortDisplayName(@NonNull Context context) {
String name = Util.getFirstNonEmpty(getName(context),
getProfileName().getGivenName(),

View File

@@ -164,7 +164,7 @@ public class RecipientDetails {
this.storageId = null;
this.identityKey = null;
this.identityStatus = VerifiedStatus.DEFAULT;
this.mentionSetting = MentionSetting.GLOBAL;
this.mentionSetting = MentionSetting.ALWAYS_NOTIFY;
}
public static @NonNull RecipientDetails forIndividual(@NonNull Context context, @NonNull RecipientSettings settings) {