Fixing new color access for action items

This commit is contained in:
ThomasSession 2024-07-15 10:46:46 +10:00
parent c9c715b486
commit facbee99a5
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ package org.thoughtcrime.securesms.components.menu
import android.content.Context
import androidx.annotation.AttrRes
import androidx.annotation.ColorRes
import androidx.annotation.ColorInt
/**
* Represents an action to be rendered
@ -13,5 +13,5 @@ data class ActionItem(
val action: Runnable,
val contentDescription: Int? = null,
val subtitle: ((Context) -> CharSequence?)? = null,
@ColorRes val color: Int? = null,
@ColorInt val color: Int? = null,
)

View File

@ -78,7 +78,7 @@ class ContextMenuList(recyclerView: RecyclerView, onItemClick: () -> Unit) {
override fun bind(model: DisplayItem) {
val item = model.item
val color = item.color?.let { ContextCompat.getColor(context, it) }
val color = item.color
if (item.iconRes > 0) {
val typedValue = TypedValue()