Fix member tag overlapping sender name above small media.
This commit is contained in:
1 parent
c260d9f0ea
commit
d05bff902a
1 file changed
+17
@@ -5929,6 +5929,23 @@ int Message::minWidthForMedia() const {
|
||||
if (const auto keyboard = inlineReplyKeyboard()) {
|
||||
accumulate_max(result, keyboard->naturalWidth());
|
||||
}
|
||||
if (Has<RightBadge>() && displayFromName() && drawBubble()) {
|
||||
const auto from = displayFrom();
|
||||
validateFromNameText(from);
|
||||
const auto &name = from
|
||||
? _fromName
|
||||
: data()->displayHiddenSenderInfo()->nameText();
|
||||
accumulate_max(
|
||||
result,
|
||||
st::msgPadding.left()
|
||||
+ name.maxWidth()
|
||||
+ (_fromNameStatus
|
||||
? st::dialogsPremiumIcon.icon.width()
|
||||
: 0)
|
||||
+ st::msgPadding.right()
|
||||
+ st::msgPadding.right()
|
||||
+ rightBadgeWidth());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user