mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 14:27:24 +00:00
Use avatars from server (depending on light/dark mode)
Placeholder avatars now also come from the server. This means themed avatars from the android app itself are no longer used here. The static placeholder icons defined in loadConversationAvatar are only used when the http request fails completely. Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
ed4fa3690d
commit
87c53979c4
@ -176,7 +176,9 @@ class ConversationItem(
|
||||
}
|
||||
}
|
||||
|
||||
ConversationType.ROOM_GROUP_CALL, ConversationType.FORMER_ONE_TO_ONE, ConversationType.ROOM_PUBLIC_CALL ->
|
||||
ConversationType.ROOM_GROUP_CALL,
|
||||
ConversationType.FORMER_ONE_TO_ONE,
|
||||
ConversationType.ROOM_PUBLIC_CALL ->
|
||||
holder.binding.dialogAvatar.loadConversationAvatar(user, model)
|
||||
|
||||
else -> holder.binding.dialogAvatar.visibility = View.GONE
|
||||
|
@ -270,15 +270,6 @@ fun ImageView.loadDefaultGroupCallAvatar(viewThemeUtils: ViewThemeUtils): io.rea
|
||||
return loadAvatar(data)
|
||||
}
|
||||
|
||||
fun ImageView.loadDefaultPublicCallAvatar(viewThemeUtils: ViewThemeUtils): io.reactivex.disposables.Disposable {
|
||||
val data: Any = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
viewThemeUtils.talk.themePlaceholderAvatar(this, R.drawable.ic_avatar_link) as Any
|
||||
} else {
|
||||
R.drawable.ic_circular_link
|
||||
}
|
||||
return loadAvatar(data)
|
||||
}
|
||||
|
||||
fun ImageView.loadMailAvatar(viewThemeUtils: ViewThemeUtils): io.reactivex.disposables.Disposable {
|
||||
val data: Any = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
viewThemeUtils.talk.themePlaceholderAvatar(this, R.drawable.ic_avatar_mail) as Any
|
||||
|
Loading…
Reference in New Issue
Block a user