1
0
Fork 1

bold nicknames in message bubbles

This commit is contained in:
Arne 2024-11-16 23:29:39 +01:00
parent c29ed31476
commit 4e2e9260bb
2 changed files with 17 additions and 1 deletions

View file

@ -397,7 +397,9 @@ public class MessageAdapter extends ArrayAdapter<Message> {
if (mForceNames || multiReceived || (message.getTrueCounterpart() != null && message.getContact() != null)) {
final String displayName = UIHelper.getMessageDisplayName(message);
if (displayName != null) {
timeInfoBuilder.add(displayName);
timeInfoBuilder.add("");
viewHolder.username.setVisibility(View.VISIBLE);
viewHolder.username.setText(displayName);
}
}
if (bodyLanguage != null) {
@ -1181,6 +1183,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
viewHolder.messageBody = view.findViewById(R.id.message_body);
}
viewHolder.time = view.findViewById(R.id.message_time);
viewHolder.username = view.findViewById(R.id.username);
viewHolder.subject = view.findViewById(R.id.message_subject);
viewHolder.inReplyTo = view.findViewById(R.id.in_reply_to);
viewHolder.inReplyToBox = view.findViewById(R.id.in_reply_to_box);
@ -1210,6 +1213,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
viewHolder.messageBody = view.findViewById(R.id.message_body);
}
viewHolder.time = view.findViewById(R.id.message_time);
viewHolder.username = view.findViewById(R.id.username);
viewHolder.subject = view.findViewById(R.id.message_subject);
viewHolder.inReplyTo = view.findViewById(R.id.in_reply_to);
viewHolder.inReplyToQuote = view.findViewById(R.id.in_reply_to_quote);
@ -1967,6 +1971,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
protected ImageView indicator;
protected ImageView indicatorReceived;
protected TextView time;
protected TextView username;
protected TextView subject;
protected TextView inReplyTo;
protected TextView inReplyToQuote;

View file

@ -140,6 +140,17 @@
android:textAppearance="?textAppearanceBodySmall"
android:textColor="?colorOnTertiaryContainer"
tools:text="10:42" />
<TextView
android:id="@+id/username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:visibility="gone"
android:textStyle="bold"
android:textAppearance="?textAppearanceBodySmall"
android:textColor="?colorOnTertiaryContainer" />
</com.wefika.flowlayout.FlowLayout>
</LinearLayout>
</LinearLayout>