fix: hide comments for posts

This commit is contained in:
ZavaruKitsu 2024-02-04 15:26:43 +03:00
parent 33b6f5d207
commit f6081db13f
2 changed files with 8 additions and 2 deletions

View file

@ -1274,6 +1274,10 @@ void Message::paintCommentsButton(
Painter &p,
QRect &g,
const PaintContext &context) const {
if (AyuFeatures::MessageShot::isTakingShot()) {
return;
}
if (!data()->repliesAreComments() && !data()->externalReply()) {
return;
}
@ -4056,7 +4060,9 @@ int Message::resizeContentGetHeight(int newWidth) {
}
if (item->repliesAreComments() || item->externalReply()) {
newHeight += st::historyCommentsButtonHeight;
if (!AyuFeatures::MessageShot::isTakingShot()) {
newHeight += st::historyCommentsButtonHeight;
}
} else if (_comments) {
_comments = nullptr;
checkHeavyPart();

View file

@ -713,7 +713,7 @@ void Gif::draw(Painter &p, const PaintContext &context) const {
const auto skipDrawingSurrounding = context.skipDrawingParts
== PaintContext::SkipDrawingParts::Surrounding;
if (!unwrapped && !skipDrawingSurrounding) {
if (!unwrapped && !skipDrawingSurrounding && !AyuFeatures::MessageShot::ignoreRender(AyuFeatures::MessageShot::RenderPart::Date)) {
if (!isRound || !inWebPage) {
drawCornerStatus(p, context, QPoint());
}