mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-07 04:22:48 +00:00
Use larger version of ic_contact_picture in calls
Closes #4971 Fixes #4245 // FREEBIE
This commit is contained in:
committed by
Moxie Marlinspike
parent
1e2a45d440
commit
1abf39685a
@@ -37,8 +37,12 @@ public class ContactPhotoFactory {
|
||||
}
|
||||
|
||||
public static ContactPhoto getContactPhoto(Context context, Uri uri, String name) {
|
||||
int targetSize = context.getResources().getDimensionPixelSize(R.dimen.contact_photo_target_size);
|
||||
return getContactPhoto(context, uri, name, targetSize);
|
||||
}
|
||||
|
||||
public static ContactPhoto getContactPhoto(Context context, Uri uri, String name, int targetSize) {
|
||||
try {
|
||||
int targetSize = context.getResources().getDimensionPixelSize(R.dimen.contact_photo_target_size);
|
||||
Bitmap bitmap = Glide.with(context)
|
||||
.load(new ContactPhotoUri(uri)).asBitmap()
|
||||
.centerCrop().into(targetSize, targetSize).get();
|
||||
|
||||
@@ -48,6 +48,6 @@ public class GeneratedContactPhoto implements ContactPhoto {
|
||||
|
||||
@Override
|
||||
public Drawable asCallCard(Context context) {
|
||||
return ContextCompat.getDrawable(context, R.drawable.ic_contact_picture);
|
||||
return ContextCompat.getDrawable(context, R.drawable.ic_contact_picture_large);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user