Browse Source

use dark avatars for dark mode in ChatActivity

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Marcel Hibbe 1 năm trước cách đây
mục cha
commit
c641d51eec
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt

+ 5 - 0
app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt

@@ -160,6 +160,7 @@ import com.nextcloud.talk.utils.ApiUtils
 import com.nextcloud.talk.utils.ContactUtils
 import com.nextcloud.talk.utils.DateConstants
 import com.nextcloud.talk.utils.DateUtils
+import com.nextcloud.talk.utils.DisplayUtils
 import com.nextcloud.talk.utils.FileUtils
 import com.nextcloud.talk.utils.ImageEmojiEditText
 import com.nextcloud.talk.utils.MagicCharPolicy
@@ -1006,6 +1007,10 @@ class ChatActivity :
                 )
             }
 
+            if (DisplayUtils.isDarkModeOn(supportActionBar?.themedContext)) {
+                url = "$url/dark"
+            }
+
             val target = object : Target {
 
                 private fun setIcon(drawable: Drawable?) {