From 9d1762eab0374901a73bce68145ab12d6c2a092a Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 13 Apr 2024 00:27:45 +0930 Subject: [PATCH] Fix message menu icons not visible in light theme --- .../thoughtcrime/securesms/components/menu/ContextMenuList.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/menu/ContextMenuList.kt b/app/src/main/java/org/thoughtcrime/securesms/components/menu/ContextMenuList.kt index 31870e9b7a..69dec0cdd6 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/menu/ContextMenuList.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/components/menu/ContextMenuList.kt @@ -17,6 +17,7 @@ import kotlinx.coroutines.Job import kotlinx.coroutines.delay import kotlinx.coroutines.launch import network.loki.messenger.R +import org.session.libsession.utilities.getColorFromAttr import org.thoughtcrime.securesms.util.adapter.mapping.LayoutFactory import org.thoughtcrime.securesms.util.adapter.mapping.MappingAdapter import org.thoughtcrime.securesms.util.adapter.mapping.MappingModel @@ -84,7 +85,7 @@ class ContextMenuList(recyclerView: RecyclerView, onItemClick: () -> Unit) { context.theme.resolveAttribute(item.iconRes, typedValue, true) icon.setImageDrawable(ContextCompat.getDrawable(context, typedValue.resourceId)) - icon.imageTintList = color?.let(ColorStateList::valueOf) + icon.imageTintList = ColorStateList.valueOf(color ?: context.getColorFromAttr(android.R.attr.textColor)) } item.contentDescription?.let(context.resources::getString)?.let { itemView.contentDescription = it } title.setText(item.title)