mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-23 13:40:43 +01:00
Fix avatars in chat
This commit is contained in:
parent
6bfd8bd0ca
commit
404f56d9a7
@ -356,6 +356,11 @@ class ChatController(args: Bundle) : BaseController(), MessagesListAdapter
|
|||||||
adapter = MessagesListAdapter(
|
adapter = MessagesListAdapter(
|
||||||
conversationUser?.userId, messageHolders, ImageLoader { imageView, url, payload ->
|
conversationUser?.userId, messageHolders, ImageLoader { imageView, url, payload ->
|
||||||
imageView.load(url) {
|
imageView.load(url) {
|
||||||
|
if (conversationUser != null && url!!.startsWith(conversationUser.baseUrl) && (url.contains(
|
||||||
|
"index.php/core/preview?fileId=") || url.contains("/avatar/"))) {
|
||||||
|
addHeader("Authorization", conversationUser.getCredentials())
|
||||||
|
}
|
||||||
|
|
||||||
if (url!!.contains("/avatar/")) {
|
if (url!!.contains("/avatar/")) {
|
||||||
transformations(CircleCropTransformation())
|
transformations(CircleCropTransformation())
|
||||||
} else {
|
} else {
|
||||||
@ -371,11 +376,6 @@ class ChatController(args: Bundle) : BaseController(), MessagesListAdapter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conversationUser != null && url.startsWith(conversationUser.baseUrl) && url.contains(
|
|
||||||
"index.php/core/preview?fileId=")) {
|
|
||||||
addHeader("Authorization", conversationUser.getCredentials())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user