mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
fix: hide comments for posts
This commit is contained in:
parent
33b6f5d207
commit
f6081db13f
2 changed files with 8 additions and 2 deletions
|
@ -1274,6 +1274,10 @@ void Message::paintCommentsButton(
|
||||||
Painter &p,
|
Painter &p,
|
||||||
QRect &g,
|
QRect &g,
|
||||||
const PaintContext &context) const {
|
const PaintContext &context) const {
|
||||||
|
if (AyuFeatures::MessageShot::isTakingShot()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!data()->repliesAreComments() && !data()->externalReply()) {
|
if (!data()->repliesAreComments() && !data()->externalReply()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -4056,7 +4060,9 @@ int Message::resizeContentGetHeight(int newWidth) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item->repliesAreComments() || item->externalReply()) {
|
if (item->repliesAreComments() || item->externalReply()) {
|
||||||
|
if (!AyuFeatures::MessageShot::isTakingShot()) {
|
||||||
newHeight += st::historyCommentsButtonHeight;
|
newHeight += st::historyCommentsButtonHeight;
|
||||||
|
}
|
||||||
} else if (_comments) {
|
} else if (_comments) {
|
||||||
_comments = nullptr;
|
_comments = nullptr;
|
||||||
checkHeavyPart();
|
checkHeavyPart();
|
||||||
|
|
|
@ -713,7 +713,7 @@ void Gif::draw(Painter &p, const PaintContext &context) const {
|
||||||
const auto skipDrawingSurrounding = context.skipDrawingParts
|
const auto skipDrawingSurrounding = context.skipDrawingParts
|
||||||
== PaintContext::SkipDrawingParts::Surrounding;
|
== PaintContext::SkipDrawingParts::Surrounding;
|
||||||
|
|
||||||
if (!unwrapped && !skipDrawingSurrounding) {
|
if (!unwrapped && !skipDrawingSurrounding && !AyuFeatures::MessageShot::ignoreRender(AyuFeatures::MessageShot::RenderPart::Date)) {
|
||||||
if (!isRound || !inWebPage) {
|
if (!isRound || !inWebPage) {
|
||||||
drawCornerStatus(p, context, QPoint());
|
drawCornerStatus(p, context, QPoint());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue