瀏覽代碼

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>
Marcel Hibbe 2 年之前
父節點
當前提交
87c53979c4

+ 3 - 1
app/src/main/java/com/nextcloud/talk/adapters/items/ConversationItem.kt

@@ -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

+ 0 - 9
app/src/main/java/com/nextcloud/talk/extensions/ImageViewExtensions.kt

@@ -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