2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 07:35:12 +00:00

Support adaptive forum userpic rounding radius.

This commit is contained in:
John Preston
2022-12-05 16:18:10 +04:00
parent 2407ac50bc
commit cb653df0f6
100 changed files with 662 additions and 724 deletions

View File

@@ -660,7 +660,7 @@ Notification::Notification(
auto position = computePosition(st::notifyMinHeight);
updateGeometry(position.x(), position.y(), st::notifyWidth, st::notifyMinHeight);
_userpicLoaded = !_userpicView || (_userpicView->image() != nullptr);
_userpicLoaded = !Ui::PeerUserpicLoading(_userpicView);
updateNotifyDisplay();
_hideTimer.setSingleShot(true);
@@ -1004,7 +1004,7 @@ void Notification::updatePeerPhoto() {
return;
}
_userpicView = _peer->createUserpicView();
if (_userpicView && !_userpicView->image()) {
if (Ui::PeerUserpicLoading(_userpicView)) {
return;
}
_userpicLoaded = true;
@@ -1024,7 +1024,7 @@ void Notification::updatePeerPhoto() {
st::notifyPhotoPos.y(),
width(),
st::notifyPhotoSize);
_userpicView = nullptr;
_userpicView = {};
update();
}