mirror of
https://codeberg.org/monocles/monocles_chat.git
synced 2025-01-30 16:51:42 +01:00
Merge pull request 'Fix overlapping status text if squared avatars are enabled' (#183) from tfl/monocles_chat:fix_overlapping_text_on_squared_avatars into master
Reviewed-on: https://codeberg.org/monocles/monocles_chat/pulls/183
This commit is contained in:
commit
2fabf12827
1 changed files with 9 additions and 1 deletions
|
@ -1536,10 +1536,18 @@ public class MessageAdapter extends ArrayAdapter<Message> {
|
||||||
view = activity.getLayoutInflater().inflate(R.layout.message_status, parent, false);
|
view = activity.getLayoutInflater().inflate(R.layout.message_status, parent, false);
|
||||||
if (activity.xmppConnectionService != null && activity.xmppConnectionService.getBooleanPreference("set_round_avatars", R.bool.set_round_avatars)) {
|
if (activity.xmppConnectionService != null && activity.xmppConnectionService.getBooleanPreference("set_round_avatars", R.bool.set_round_avatars)) {
|
||||||
viewHolder.contact_picture = view.findViewById(R.id.message_photo);
|
viewHolder.contact_picture = view.findViewById(R.id.message_photo);
|
||||||
|
viewHolder.status_message = view.findViewById(R.id.status_message);
|
||||||
} else {
|
} else {
|
||||||
viewHolder.contact_picture = view.findViewById(R.id.message_photo_square);
|
viewHolder.contact_picture = view.findViewById(R.id.message_photo_square);
|
||||||
|
// Update layout constraints because the textview would now reference the wrong ShapeableImageView
|
||||||
|
// This should only be the case in MUC's where the participants can see the READ status
|
||||||
|
TextView status_message = view.findViewById(R.id.status_message);
|
||||||
|
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) status_message.getLayoutParams();
|
||||||
|
params.addRule(RelativeLayout.RIGHT_OF, R.id.message_photo_square);
|
||||||
|
params.addRule(RelativeLayout.END_OF, R.id.message_photo_square);
|
||||||
|
status_message.setLayoutParams(params);
|
||||||
|
viewHolder.status_message = status_message;
|
||||||
}
|
}
|
||||||
viewHolder.status_message = view.findViewById(R.id.status_message);
|
|
||||||
viewHolder.load_more_messages = view.findViewById(R.id.load_more_messages);
|
viewHolder.load_more_messages = view.findViewById(R.id.load_more_messages);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Reference in a new issue