瀏覽代碼

use dark avatars for dark mode in ChatActivity

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Marcel Hibbe 1 年之前
父節點
當前提交
c641d51eec
共有 1 個文件被更改,包括 5 次插入0 次删除
  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?) {