Add community photo editing in the manage box.

This commit is contained in:
John Preston
2026-06-12 20:03:47 +04:00
parent 31cd148e87
commit 628b502228
3 changed files with 66 additions and 15 deletions
+5 -6
View File
@@ -464,11 +464,7 @@ void PeerData::paintUserpic(
const auto cloud = userpicCloudImage(view);
const auto ratio = style::DevicePixelRatio();
if (context.shape == Ui::PeerUserpicShape::Auto) {
context.shape = (isForum() && !isBot())
? Ui::PeerUserpicShape::Forum
: isMonoforum()
? Ui::PeerUserpicShape::Monoforum
: Ui::PeerUserpicShape::Circle;
context.shape = userpicShape();
}
Ui::ValidateUserpicCache(
view,
@@ -1296,7 +1292,10 @@ not_null<const PeerData*> PeerData::userpicPaintingPeer() const {
}
Ui::PeerUserpicShape PeerData::userpicShape() const {
return isForum() && !isBot()
const auto channel = asChannel();
return (isForum() && !isBot())
? Ui::PeerUserpicShape::Forum
: (channel && channel->isCommunity())
? Ui::PeerUserpicShape::Forum
: isMonoforum()
? Ui::PeerUserpicShape::Monoforum