mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-22 04:59:34 +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(
|
||||
conversationUser?.userId, messageHolders, ImageLoader { imageView, url, payload ->
|
||||
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/")) {
|
||||
transformations(CircleCropTransformation())
|
||||
} 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 {
|
||||
|
Loading…
Reference in New Issue
Block a user