From f53f9381b8c5e11e0c7de2264dfcd7122b417089 Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Fri, 6 Sep 2024 14:12:23 +0200 Subject: [PATCH 1/2] fix to always render selfReactions with background color = fix type of list in stringToArrayList Signed-off-by: Marcel Hibbe --- .../talk/data/source/local/converters/ArrayListConverter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/nextcloud/talk/data/source/local/converters/ArrayListConverter.kt b/app/src/main/java/com/nextcloud/talk/data/source/local/converters/ArrayListConverter.kt index 2248c3fc91..8474102c60 100644 --- a/app/src/main/java/com/nextcloud/talk/data/source/local/converters/ArrayListConverter.kt +++ b/app/src/main/java/com/nextcloud/talk/data/source/local/converters/ArrayListConverter.kt @@ -33,6 +33,6 @@ class ArrayListConverter { return null } - return LoganSquare.parseList(value, List::class.java) as ArrayList? + return LoganSquare.parseList(value, String::class.java) as ArrayList? } } From a0a388cc0754db7c34d9d941b372bd826e95b7d5 Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Fri, 6 Sep 2024 14:27:17 +0200 Subject: [PATCH 2/2] fix to switch background color between incoming&outgoing reaction Signed-off-by: Marcel Hibbe --- .../nextcloud/talk/ui/theme/TalkSpecificViewThemeUtils.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/ui/theme/TalkSpecificViewThemeUtils.kt b/app/src/main/java/com/nextcloud/talk/ui/theme/TalkSpecificViewThemeUtils.kt index 9537d159d2..84bfe9800e 100644 --- a/app/src/main/java/com/nextcloud/talk/ui/theme/TalkSpecificViewThemeUtils.kt +++ b/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,