mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-22 09:07:05 +02:00
Always keep current self-userpic loaded.
This commit is contained in:
parent
571a15bf92
commit
99704e973b
2 changed files with 15 additions and 1 deletions
|
@ -400,6 +400,15 @@ MainWidget::MainWidget(
|
|||
floatPlayerClosed(itemId);
|
||||
}, lifetime());
|
||||
|
||||
// Load current userpic and keep it loaded.
|
||||
Notify::PeerUpdateValue(
|
||||
session().user(),
|
||||
Notify::PeerUpdate::Flag::PhotoChanged
|
||||
) | rpl::start_with_next([=] {
|
||||
[[maybe_unused]] const auto image = session().user()->currentUserpic(
|
||||
_selfUserpicView);
|
||||
}, lifetime());
|
||||
|
||||
_ptsWaiter.setRequesting(true);
|
||||
updateScrollColors();
|
||||
setupConnectingWidget();
|
||||
|
|
|
@ -38,6 +38,7 @@ struct PeerUpdate;
|
|||
|
||||
namespace Data {
|
||||
class WallPaper;
|
||||
class CloudImageView;
|
||||
} // namespace Data
|
||||
|
||||
namespace Dialogs {
|
||||
|
@ -107,7 +108,9 @@ class MainWidget
|
|||
public:
|
||||
using SectionShow = Window::SectionShow;
|
||||
|
||||
MainWidget(QWidget *parent, not_null<Window::SessionController*> controller);
|
||||
MainWidget(
|
||||
QWidget *parent,
|
||||
not_null<Window::SessionController*> controller);
|
||||
|
||||
[[nodiscard]] Main::Session &session() const;
|
||||
|
||||
|
@ -459,6 +462,8 @@ private:
|
|||
int _thirdColumnWidth = 0;
|
||||
Ui::Animations::Simple _a_dialogsWidth;
|
||||
|
||||
std::shared_ptr<Data::CloudImageView> _selfUserpicView;
|
||||
|
||||
object_ptr<Ui::PlainShadow> _sideShadow;
|
||||
object_ptr<Ui::PlainShadow> _thirdShadow = { nullptr };
|
||||
object_ptr<Ui::ResizeArea> _firstColumnResizeArea = { nullptr };
|
||||
|
|
Loading…
Add table
Reference in a new issue