mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 17:29:32 +01:00
Add accessibility label on buttons.
This commit is contained in:
@@ -26,7 +26,8 @@ import org.thoughtcrime.securesms.util.NameUtil
|
||||
fun AvatarImage(
|
||||
recipient: Recipient,
|
||||
modifier: Modifier = Modifier,
|
||||
useProfile: Boolean = true
|
||||
useProfile: Boolean = true,
|
||||
contentDescription: String? = null
|
||||
) {
|
||||
if (LocalInspectionMode.current) {
|
||||
Spacer(
|
||||
@@ -38,7 +39,11 @@ fun AvatarImage(
|
||||
val state = recipient.live().liveData.map { AvatarImageState(NameUtil.getAbbreviation(it.getDisplayName(context)), it, AvatarHelper.getAvatarFileDetails(context, it.id)) }.observeAsState().value ?: return
|
||||
|
||||
AndroidView(
|
||||
factory = ::AvatarImageView,
|
||||
factory = {
|
||||
AvatarImageView(context).apply {
|
||||
this.contentDescription = contentDescription
|
||||
}
|
||||
},
|
||||
modifier = modifier.background(color = Color.Transparent, shape = CircleShape)
|
||||
) {
|
||||
if (useProfile) {
|
||||
|
||||
Reference in New Issue
Block a user