a11y conversation-emojie and read/sent status of messages

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2021-05-04 12:53:18 +02:00
parent bf4f2f87fe
commit 1e702f1d1d
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
3 changed files with 12 additions and 0 deletions

View file

@ -194,12 +194,20 @@ class MagicOutcomingTextMessageViewHolder(itemView: View) : OutcomingTextMessage
else -> null
}
val readStatusContentDescriptionString = when (message.readStatus) {
ReadStatus.READ -> context?.resources?.getString(R.string.nc_message_read)
ReadStatus.SENT -> context?.resources?.getString(R.string.nc_message_sent)
else -> null
}
readStatusDrawableInt?.let { drawableInt ->
context?.resources?.getDrawable(drawableInt, null)?.let {
it.setColorFilter(context?.resources!!.getColor(R.color.white60), PorterDuff.Mode.SRC_ATOP)
checkMark?.setImageDrawable(it)
}
}
checkMark?.setContentDescription(readStatusContentDescriptionString)
}
init {

View file

@ -74,6 +74,7 @@
android:layout_alignParentEnd="true"
android:layout_marginStart="-4dp"
android:background="@color/transparent"
android:contentDescription="@string/nc_add_emojis"
android:src="@drawable/ic_insert_emoticon_black_24dp"
android:tint="@color/emoji_icons"
android:visibility="gone"

View file

@ -233,6 +233,7 @@
<string name="nc_ok">OK</string>
<string name="nc_call_name">Conversation name</string>
<string name="nc_proceed">Proceed</string>
<string name="nc_add_emojis">Add Emojis</string>
<string name="nc_call_name_is_same">The name you entered is the same as the existing one</string>
<string name="nc_wrong_link">Conversation link is not valid</string>
<string name="nc_share_text">Join the conversation at %1$s/index.php/call/%2$s</string>
@ -275,6 +276,8 @@
<string name="nc_message_quote_cancel_reply">Cancel reply</string>
<!-- When translating to German, please use non-formal variant -->
<string name="nc_formatted_message_you">You: %1$s</string>
<string name="nc_message_read">Message read</string>
<string name="nc_message_sent">Message sent</string>
<!-- Contacts endless loading -->
<string name="nc_no_more_load_retry">No more items to load. Refresh to retry.</string>