This commit is contained in:
Niels Andriesse
2019-11-18 13:21:52 +11:00
parent 35ee1c1391
commit e785eab28b
2 changed files with 6 additions and 10 deletions

View File

@@ -155,14 +155,14 @@ public class AvatarImageView extends AppCompatImageView {
}
private void updateImage() { updateImage(getWidth(), getHeight()); }
private void updateImage(int w, int h) {
if (w == 0 || h == 0 || recipient == null) { return; }
Drawable image;
Context context = this.getContext();
if (recipient.isGroupRecipient()) {
String name = Optional.fromNullable(recipient.getName()).or(Optional.fromNullable(TextSecurePreferences.getProfileName(context))).or("");
MaterialColor fallbackColor = recipient.getColor();