mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-25 11:20:47 +01:00
Fix emoji avatar missing after edit.
This commit is contained in:
@@ -45,7 +45,7 @@ public class GeneratedContactPhoto implements FallbackContactPhoto {
|
||||
|
||||
@Override
|
||||
public Drawable asDrawable(@NonNull Context context, @NonNull AvatarColor color, boolean inverted) {
|
||||
int targetSize = this.targetSize != -1
|
||||
int targetSize = this.targetSize > 0
|
||||
? this.targetSize
|
||||
: context.getResources().getDimensionPixelSize(R.dimen.contact_photo_target_size);
|
||||
|
||||
@@ -54,7 +54,7 @@ public class GeneratedContactPhoto implements FallbackContactPhoto {
|
||||
if (!TextUtils.isEmpty(character)) {
|
||||
Avatars.ForegroundColor foregroundColor = Avatars.getForegroundColor(color);
|
||||
Avatar.Text avatar = new Avatar.Text(character, new Avatars.ColorPair(color, foregroundColor), Avatar.DatabaseId.DoNotPersist.INSTANCE);
|
||||
Drawable foreground = AvatarRenderer.createTextDrawable(context, avatar, inverted, targetSize);
|
||||
Drawable foreground = AvatarRenderer.createTextDrawable(context, avatar, inverted, targetSize, false);
|
||||
Drawable background = Objects.requireNonNull(ContextCompat.getDrawable(context, R.drawable.circle_tintable));
|
||||
|
||||
background.setColorFilter(new SimpleColorFilter(inverted ? foregroundColor.getColorInt() : color.colorInt()));
|
||||
|
||||
Reference in New Issue
Block a user