Skip to content

Commit 6d00165

Browse files
23rdjohn-preston
authored andcommitted
Fixed text state of media in sponsored messages.
1 parent 693eaf9 commit 6d00165

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

Telegram/SourceFiles/history/view/media/history_view_web_page.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,11 +1350,17 @@ TextState WebPage::textState(QPoint point, StateRequest request) const {
13501350
tshift -= _attach->height();
13511351
}
13521352

1353-
const auto rect = QRect(
1354-
inner.left(),
1355-
tshift,
1356-
paintw,
1357-
inner.top() + inner.height() - tshift);
1353+
const auto rect = hasSponsoredMedia
1354+
? QRect(
1355+
inner.left(),
1356+
inner.top(),
1357+
_attach->width(),
1358+
_attach->height())
1359+
: QRect(
1360+
inner.left(),
1361+
tshift,
1362+
paintw,
1363+
inner.top() + inner.height() - tshift);
13581364
if (rect.contains(point)) {
13591365
const auto attachLeft = rtl()
13601366
? width() - (inner.left() - bubble.left()) - _attach->width()

0 commit comments

Comments
 (0)