diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp index 50fe1cbf8a..4c0fcb18e2 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_message.cpp @@ -1860,7 +1860,6 @@ void Message::paintText( const auto stm = context.messageStyle(); p.setPen(stm->historyTextFg); p.setFont(st::msgFont); - prepareCustomEmojiPaint(p, context, text()); if (const auto botTop = Get()) { botTop->text.drawLeftElided( p, @@ -1870,6 +1869,10 @@ void Message::paintText( width()); trect.setY(trect.y() + botTop->height); } + if (!context.clip.intersects(trect)) { + return; + } + prepareCustomEmojiPaint(p, context, text()); auto highlightRequest = context.computeHighlightCache(); text().draw(p, { .position = trect.topLeft(),