瀏覽代碼

fix to switch background color between incoming&outgoing reaction

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Marcel Hibbe 10 月之前
父節點
當前提交
a0a388cc07
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      app/src/main/java/com/nextcloud/talk/ui/theme/TalkSpecificViewThemeUtils.kt

+ 4 - 4
app/src/main/java/com/nextcloud/talk/ui/theme/TalkSpecificViewThemeUtils.kt

@@ -164,18 +164,18 @@ class TalkSpecificViewThemeUtils @Inject constructor(
         }
     }
 
-    fun setCheckedBackground(linearLayout: LinearLayout, incoming: Boolean) {
+    fun setCheckedBackground(linearLayout: LinearLayout, outgoing: Boolean) {
         withScheme(linearLayout) { scheme ->
             val drawable = AppCompatResources
                 .getDrawable(linearLayout.context, R.drawable.reaction_self_background)!!
                 .mutate()
-            val backgroundColor = if (incoming) {
-                dynamicColor.primaryContainer().getArgb(scheme)
-            } else {
+            val backgroundColor = if (outgoing) {
                 ContextCompat.getColor(
                     linearLayout.context,
                     R.color.bg_message_list_incoming_bubble
                 )
+            } else {
+                dynamicColor.primaryContainer().getArgb(scheme)
             }
             DrawableCompat.setTintList(
                 drawable,