diff --git a/Telegram/SourceFiles/history/view/media/history_view_document.cpp b/Telegram/SourceFiles/history/view/media/history_view_document.cpp index b940873a98..acfc6a38cf 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_document.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_document.cpp @@ -43,6 +43,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL // AyuGram includes #include "ayu/ayu_settings.h" +#include "ayu/features/message_shot/message_shot.h" namespace HistoryView { @@ -685,7 +686,7 @@ void Document::draw( FillThumbnailOverlay(p, rthumb, rounding, context); } - if (radial || (!loaded && !_data->loading()) || _data->waitingForAlbum()) { + if ((radial || (!loaded && !_data->loading()) || _data->waitingForAlbum()) && !AyuFeatures::MessageShot::isTakingShot()) { const auto backOpacity = (loaded && !_data->uploading()) ? radialOpacity : 1.; p.setPen(Qt::NoPen); p.setBrush(sti->msgDateImgBg); @@ -1081,7 +1082,8 @@ void Document::drawCornerDownload( LayoutMode mode) const { if (dataLoaded() || _data->loadedInMediaCache() - || !downloadInCorner()) { + || !downloadInCorner() + || AyuFeatures::MessageShot::isTakingShot()) { return; } auto topMinus = isBubbleTop() ? 0 : st::msgFileTopMinus; diff --git a/Telegram/SourceFiles/history/view/media/history_view_gif.cpp b/Telegram/SourceFiles/history/view/media/history_view_gif.cpp index 84e2cd8e2e..dc00937607 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_gif.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_gif.cpp @@ -640,7 +640,7 @@ void Gif::draw(Painter &p, const PaintContext &context) const { && (radial || (!streamingMode && ((!loaded && !_data->loading()) || !autoplay))); - if (paintInCenter) { + if (paintInCenter && !AyuFeatures::MessageShot::isTakingShot()) { const auto radialRevealed = 1.; const auto opacity = (item->isSending() || _data->uploading()) ? 1. @@ -1148,7 +1148,7 @@ void Gif::drawCornerStatus( p.setFont(st::normalFont); p.setPen(st->msgDateImgFg()); p.drawTextLeft(statusX + addLeft, statusTextTop, width(), text, statusW - 2 * padding.x()); - if (cornerDownload) { + if (cornerDownload && !AyuFeatures::MessageShot::isTakingShot()) { const auto downloadTextTop = statusY + st::normalFont->height + (2 * (statusH - 2 * st::normalFont->height) / 3) - padding.y(); p.drawTextLeft(statusX + addLeft, downloadTextTop, width(), _downloadSize, statusW - 2 * padding.x()); const auto inner = QRect(statusX + padding.y() - padding.x(), statusY, st::historyVideoDownloadSize, st::historyVideoDownloadSize); @@ -1519,7 +1519,7 @@ void Gif::drawGrouped( && (radial || (!streamingMode && ((!loaded && !_data->loading()) || !autoplay))); - if (paintInCenter) { + if (paintInCenter && !AyuFeatures::MessageShot::isTakingShot()) { const auto radialRevealed = 1.; const auto opacity = (item->isSending() || _data->uploading()) ? 1. diff --git a/Telegram/SourceFiles/history/view/media/history_view_photo.cpp b/Telegram/SourceFiles/history/view/media/history_view_photo.cpp index 42f02938f2..4b27a51af7 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_photo.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_photo.cpp @@ -360,7 +360,7 @@ void Photo::draw(Painter &p, const PaintContext &context) const { p.setBrush(over ? st->msgDateImgBgOver() : st->msgDateImgBg()); } } - if (paintInCenter) { + if (paintInCenter && !AyuFeatures::MessageShot::isTakingShot()) { const auto radialOpacity = (radial && loaded && !_data->uploading()) ? _animation->radial.opacity() : 1.; @@ -796,7 +796,7 @@ void Photo::drawGrouped( && (radial || (!loaded && !_data->loading()) || _data->waitingForAlbum()); - if (paintInCenter) { + if (paintInCenter && !AyuFeatures::MessageShot::isTakingShot()) { const auto radialOpacity = radial ? _animation->radial.opacity() : 1.; diff --git a/Telegram/SourceFiles/history/view/media/history_view_theme_document.cpp b/Telegram/SourceFiles/history/view/media/history_view_theme_document.cpp index 12df63ef02..cbb44a954d 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_theme_document.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_theme_document.cpp @@ -44,6 +44,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "styles/style_chat.h" #include "styles/style_credits.h" +// AyuGram includes +#include "ayu/features/message_shot/message_shot.h" + + namespace HistoryView { namespace { @@ -268,7 +272,7 @@ void ThemeDocument::draw(Painter &p, const PaintContext &context) const { p.setPen(st->msgDateImgFg()); p.drawTextLeft(statusX, statusY, width(), _statusText, statusW - 2 * st::msgDateImgPadding.x()); } - if (radial || (!loaded && !_data->loading())) { + if ((radial || (!loaded && !_data->loading())) && !AyuFeatures::MessageShot::isTakingShot()) { const auto radialOpacity = (radial && loaded && !_data->uploading()) ? _animation->radial.opacity() : 1.;