Fix issue where we do not display initials for contacts we have names for.

This commit is contained in:
Alex Hart 2021-04-16 10:37:23 -03:00
parent e97a14f617
commit cfd69f2da8

View file

@ -770,12 +770,14 @@ public class Recipient {
} }
public @NonNull FallbackContactPhoto getFallbackContactPhoto(@NonNull FallbackPhotoProvider fallbackPhotoProvider) { public @NonNull FallbackContactPhoto getFallbackContactPhoto(@NonNull FallbackPhotoProvider fallbackPhotoProvider) {
if (isSelf) return fallbackPhotoProvider.getPhotoForLocalNumber(); if (isSelf) return fallbackPhotoProvider.getPhotoForLocalNumber();
else if (isResolving()) return fallbackPhotoProvider.getPhotoForResolvingRecipient(); else if (isResolving()) return fallbackPhotoProvider.getPhotoForResolvingRecipient();
else if (isGroupInternal()) return fallbackPhotoProvider.getPhotoForGroup(); else if (isGroupInternal()) return fallbackPhotoProvider.getPhotoForGroup();
else if (isGroup()) return fallbackPhotoProvider.getPhotoForGroup(); else if (isGroup()) return fallbackPhotoProvider.getPhotoForGroup();
else if (!TextUtils.isEmpty(groupName)) return fallbackPhotoProvider.getPhotoForRecipientWithName(groupName); else if (!TextUtils.isEmpty(groupName)) return fallbackPhotoProvider.getPhotoForRecipientWithName(groupName);
else return fallbackPhotoProvider.getPhotoForRecipientWithoutName(); else if (!TextUtils.isEmpty(systemContactName)) return fallbackPhotoProvider.getPhotoForRecipientWithName(systemContactName);
else if (!signalProfileName.isEmpty()) return fallbackPhotoProvider.getPhotoForRecipientWithName(signalProfileName.toString());
else return fallbackPhotoProvider.getPhotoForRecipientWithoutName();
} }
public @Nullable ContactPhoto getContactPhoto() { public @Nullable ContactPhoto getContactPhoto() {