Fixed userpic paint on new self upload in profile top bar.

This commit is contained in:
23rd
2025-11-17 15:04:35 +03:00
parent 662b862d2f
commit 9752145b49
2 changed files with 10 additions and 2 deletions

View File

@@ -1027,6 +1027,13 @@ void TopBar::setupUserpicButton(
!hasLeftButton && !hasMenu());
_userpicButton->setPointerCursor(hasLeftButton);
updateVideoUserpic();
_peer->session().downloaderTaskFinished(
) | rpl::filter([=] {
return !Ui::PeerUserpicLoading(_userpicView);
}) | rpl::start_with_next([=] {
update();
_userpicLoadingLifetime.destroy();
}, _userpicLoadingLifetime);
Ui::PostponeCall(this, [=] {
update();
});

View File

@@ -244,12 +244,15 @@ private:
std::vector<AnimatedPatternPoint> _animatedPoints;
QRect _lastUserpicRect;
base::unique_qptr<Ui::AbstractButton> _userpicButton;
Ui::PeerUserpicView _userpicView;
InMemoryKey _userpicUniqueKey;
QImage _cachedUserpic;
QImage _monoforumMask;
std::unique_ptr<Ui::VideoUserpicPlayer> _videoUserpicPlayer;
std::unique_ptr<TopicIconView> _topicIconView;
rpl::lifetime _userpicLoadingLifetime;
base::unique_qptr<Ui::IconButton> _close;
base::unique_qptr<Ui::FadeWrap<Ui::IconButton>> _back;
@@ -261,8 +264,6 @@ private:
Ui::RpWidget *_actionMore = nullptr;
base::unique_qptr<Ui::AbstractButton> _userpicButton;
base::unique_qptr<Ui::HorizontalFitContainer> _actions;
std::unique_ptr<Lottie::MultiPlayer> _lottiePlayer;