mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 17:29:32 +01:00
Reduce profile avatar disk reads.
This commit is contained in:
@@ -36,7 +36,7 @@ fun Drawable?.toLargeBitmap(context: Context): Bitmap? {
|
||||
}
|
||||
|
||||
fun Recipient.getContactDrawable(context: Context): Drawable? {
|
||||
val contactPhoto: ContactPhoto? = if (isSelf) ProfileContactPhoto(this, profileAvatar) else contactPhoto
|
||||
val contactPhoto: ContactPhoto? = if (isSelf) ProfileContactPhoto(this) else contactPhoto
|
||||
val fallbackContactPhoto: FallbackContactPhoto = if (isSelf) getFallback(context) else fallbackContactPhoto
|
||||
return if (contactPhoto != null) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user