Add avatar picker and defaults.

This commit is contained in:
Alex Hart
2021-07-20 13:08:52 -03:00
committed by Greyson Parrelli
parent 0093e1d3eb
commit ed23c3fe7c
133 changed files with 4935 additions and 859 deletions

View File

@@ -52,7 +52,7 @@ data class NotificationConversation(
return if (SignalStore.settings().messageNotificationsPrivacy.isDisplayContact) {
recipient.getContactDrawable(context)
} else {
GeneratedContactPhoto("Unknown", R.drawable.ic_profile_outline_40).asDrawable(context, AvatarColor.UNKNOWN.colorInt())
GeneratedContactPhoto("Unknown", R.drawable.ic_profile_outline_40).asDrawable(context, AvatarColor.UNKNOWN)
}
}

View File

@@ -56,12 +56,12 @@ fun Recipient.getContactDrawable(context: Context): Drawable? {
)
.get()
} catch (e: InterruptedException) {
fallbackContactPhoto.asDrawable(context, avatarColor.colorInt())
fallbackContactPhoto.asDrawable(context, avatarColor)
} catch (e: ExecutionException) {
fallbackContactPhoto.asDrawable(context, avatarColor.colorInt())
fallbackContactPhoto.asDrawable(context, avatarColor)
}
} else {
fallbackContactPhoto.asDrawable(context, avatarColor.colorInt())
fallbackContactPhoto.asDrawable(context, avatarColor)
}
}