diff --git a/Telegram/SourceFiles/history/view/media/history_view_photo.cpp b/Telegram/SourceFiles/history/view/media/history_view_photo.cpp index a8a5f6da9..bb24f43f8 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_photo.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_photo.cpp @@ -258,6 +258,7 @@ QSize Photo::countCurrentSize(int newWidth) { const auto enlargeOuter = 2 * st::historyPageEnlargeSkip + enlargeInner; const auto showEnlarge = (_parent->media() != this) && _parent->data()->media() + && !_parent->data()->isSponsored() && _parent->data()->media()->webpage() && _parent->data()->media()->webpage()->suggestEnlargePhoto() && (newWidth >= enlargeOuter) diff --git a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp index 9345656ef..f45539f03 100644 --- a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp +++ b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp @@ -1510,10 +1510,10 @@ void OverlayWidget::refreshSponsoredButtonGeometry() { (controllerBottom // Duplicated in recountSkipTop(). - ((_streamed && _streamed->controls) ? (_streamed->controls->height() - + st::mediaviewCaptionMargin.height()) + + st::mediaviewCaptionPadding.bottom()) : 0) - _sponsoredButton->height() - - st::mediaviewCaptionPadding.bottom())); + - st::mediaviewCaptionMargin.height())); Ui::SendPendingMoveResizeEvents(_sponsoredButton.get()); } @@ -3483,6 +3483,8 @@ void OverlayWidget::displayPhoto( initStreaming(); } + initSponsoredButton(); + refreshCaption(); _blurred = true;