UI improvement for group chats

This commit is contained in:
Christian Schneppe 2020-11-07 13:09:03 +01:00
parent eb95840a40
commit f552560cdb
No known key found for this signature in database
GPG key ID: F30B8D686B44D87E

View file

@ -311,8 +311,13 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
break;
default:
if (multiReceived) {
final int shadowSize = 10;
viewHolder.username.setVisibility(View.VISIBLE);
viewHolder.username.setText(UIHelper.getColoredUsername(activity.xmppConnectionService, message));
if (activity.xmppConnectionService.colored_muc_names()) {
viewHolder.username.setShadowLayer(shadowSize, 0, 0, ContextCompat.getColor(activity, R.color.realwhite));
viewHolder.username.setPadding(shadowSize / 2, shadowSize / 2, shadowSize / 2, shadowSize / 2);
}
}
if (singleReceived) {
viewHolder.username.setVisibility(View.GONE);