mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fix unwrapped media display in Replies chat.
This commit is contained in:
parent
c534f3f22e
commit
bd5f145a8c
1 changed files with 11 additions and 2 deletions
|
@ -213,10 +213,17 @@ void UnwrappedMedia::drawSurrounding(
|
|||
p.setTextPalette(st->serviceTextPalette());
|
||||
forwarded->text.drawElided(p, rectx, recty + st::msgReplyPadding.top(), rectw, kMaxForwardedBarLines, style::al_left, 0, -1, 0, surrounding.forwardedBreakEverywhere);
|
||||
p.restoreTextPalette();
|
||||
|
||||
const auto skip = std::min(
|
||||
forwarded->text.countHeight(rectw),
|
||||
kMaxForwardedBarLines * st::msgServiceNameFont->height);
|
||||
recty += skip;
|
||||
} else if (via) {
|
||||
p.setFont(st::msgDateFont);
|
||||
p.drawTextLeft(rectx, recty + st::msgReplyPadding.top(), 2 * rectx + rectw, via->text);
|
||||
int skip = st::msgServiceNameFont->height + (reply ? st::msgReplyPadding.top() : 0);
|
||||
|
||||
const auto skip = st::msgServiceNameFont->height
|
||||
+ (reply ? st::msgReplyPadding.top() : 0);
|
||||
recty += skip;
|
||||
}
|
||||
if (reply) {
|
||||
|
@ -465,7 +472,9 @@ int UnwrappedMedia::additionalWidth(
|
|||
|
||||
auto UnwrappedMedia::getDisplayedForwardedInfo() const
|
||||
-> const HistoryMessageForwarded * {
|
||||
return _parent->data()->Get<HistoryMessageForwarded>();
|
||||
return _parent->displayForwardedFrom()
|
||||
? _parent->data()->Get<HistoryMessageForwarded>()
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
} // namespace HistoryView
|
||||
|
|
Loading…
Add table
Reference in a new issue