mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-12 18:11:13 +00:00
Added button to media viewer for photo from sponsored messages.
This commit is contained in:
parent
79c8c5ec5d
commit
4f8e914d53
@ -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)
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user