1
0
mirror of https://github.com/TwidereProject/Twidere-Android synced 2025-02-08 07:48:45 +01:00

fixed NPE on load profile image

This commit is contained in:
Mariotaku Lee 2017-03-19 11:24:58 +08:00
parent c45ee87085
commit 3c00d4e681
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535

View File

@ -124,7 +124,7 @@ fun RequestManager.loadProfileImage(context: Context, conversation: ParcelableMe
fun RequestManager.loadOriginalProfileImage(context: Context, user: ParcelableUser,
@ImageShapeStyle shapeStyle: Int, cornerRadius: Float = 0f, cornerRadiusRatio: Float = 0f
): DrawableRequestBuilder<String> {
val original = user.extras.profile_image_url_original?.takeUnless(String::isEmpty)
val original = user.extras?.profile_image_url_original?.takeUnless(String::isEmpty)
?: Utils.getOriginalTwitterProfileImage(user.profile_image_url)
return configureLoadProfileImage(context, shapeStyle, cornerRadius, cornerRadiusRatio) {
load(original)