Fix spoiler hiding of ellipse image preview.

This commit is contained in:
John Preston
2025-03-20 16:55:12 +04:00
parent 7123a6d647
commit bb8ecf2f84
4 changed files with 72 additions and 25 deletions
@@ -370,7 +370,18 @@ void MessageView::paint(
if (image.hasSpoiler()) {
const auto frame = DefaultImageSpoiler().frame(
_spoiler->index(context.now, pausedSpoiler));
FillSpoilerRect(p, mini, frame);
if (image.isEllipse()) {
const auto radius = st::dialogsMiniPreview / 2;
static auto mask = Images::CornersMask(radius);
FillSpoilerRect(
p,
mini,
Images::CornersMaskRef(mask),
frame,
_cornersCache);
} else {
FillSpoilerRect(p, mini, frame);
}
}
}
rect.setLeft(rect.x() + w);