mirror of
https://github.com/nextcloud/talk-android
synced 2025-02-03 05:03:04 +00:00
use cache for user avatars again (ignore flickering)
in the future, avatarVersion might be available for user avatars as well.. Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
d560a4a2a9
commit
898728cef9
@ -68,8 +68,6 @@ class ConversationItem(
|
||||
IFilterable<String?> {
|
||||
private var header: GenericTextHeaderItem? = null
|
||||
|
||||
private var isInitialLoad = true
|
||||
|
||||
constructor(
|
||||
conversation: Conversation,
|
||||
user: User,
|
||||
@ -172,7 +170,12 @@ class ConversationItem(
|
||||
when (model.type) {
|
||||
ConversationType.ROOM_TYPE_ONE_TO_ONE_CALL -> {
|
||||
if (!TextUtils.isEmpty(model.name)) {
|
||||
holder.binding.dialogAvatar.loadUserAvatar(user, model.name!!, true, isInitialLoad)
|
||||
holder.binding.dialogAvatar.loadUserAvatar(
|
||||
user,
|
||||
model.name!!,
|
||||
true,
|
||||
false
|
||||
)
|
||||
} else {
|
||||
holder.binding.dialogAvatar.visibility = View.GONE
|
||||
}
|
||||
@ -186,7 +189,6 @@ class ConversationItem(
|
||||
else -> holder.binding.dialogAvatar.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
isInitialLoad = false
|
||||
}
|
||||
|
||||
private fun shouldLoadAvatar(
|
||||
|
@ -84,7 +84,7 @@ fun ImageView.loadUserAvatar(
|
||||
user: User,
|
||||
avatarId: String,
|
||||
requestBigSize: Boolean = true,
|
||||
replace: Boolean
|
||||
ignoreCache: Boolean
|
||||
): io.reactivex.disposables
|
||||
.Disposable {
|
||||
val imageRequestUri = ApiUtils.getUrlForAvatar(
|
||||
@ -93,7 +93,7 @@ fun ImageView.loadUserAvatar(
|
||||
requestBigSize
|
||||
)
|
||||
|
||||
return loadAvatarInternal(user, imageRequestUri, replace, null)
|
||||
return loadAvatarInternal(user, imageRequestUri, ignoreCache, null)
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalCoilApi::class)
|
||||
|
Loading…
Reference in New Issue
Block a user