mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
If an avatar is shown for a message in group layout, make the bubble a little bit smaller.
This commit is contained in:
@@ -627,14 +627,15 @@ public class MessageObject {
|
||||
}*/
|
||||
|
||||
int maxWidth;
|
||||
boolean substractAvatar = !isOut() && MrMailbox.getChat((int)messageOwner.dialog_id).getType()==MrChat.MR_CHAT_GROUP;
|
||||
if (AndroidUtilities.isTablet()) {
|
||||
if (messageOwner.from_id > 0 && (messageOwner.to_id.channel_id != 0 || messageOwner.to_id.chat_id != 0) && !isOut()) {
|
||||
if (substractAvatar) {
|
||||
maxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(122);
|
||||
} else {
|
||||
maxWidth = AndroidUtilities.getMinTabletSide() - AndroidUtilities.dp(80);
|
||||
}
|
||||
} else {
|
||||
if (messageOwner.from_id > 0 && (messageOwner.to_id.channel_id != 0 || messageOwner.to_id.chat_id != 0) && !isOut()) {
|
||||
if (substractAvatar) {
|
||||
maxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(122);
|
||||
} else {
|
||||
maxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y) - AndroidUtilities.dp(80);
|
||||
|
||||
Reference in New Issue
Block a user