mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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);
|
floatPlayerClosed(itemId);
|
||||||
}, lifetime());
|
}, 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);
|
_ptsWaiter.setRequesting(true);
|
||||||
updateScrollColors();
|
updateScrollColors();
|
||||||
setupConnectingWidget();
|
setupConnectingWidget();
|
||||||
|
|
|
@ -38,6 +38,7 @@ struct PeerUpdate;
|
||||||
|
|
||||||
namespace Data {
|
namespace Data {
|
||||||
class WallPaper;
|
class WallPaper;
|
||||||
|
class CloudImageView;
|
||||||
} // namespace Data
|
} // namespace Data
|
||||||
|
|
||||||
namespace Dialogs {
|
namespace Dialogs {
|
||||||
|
@ -107,7 +108,9 @@ class MainWidget
|
||||||
public:
|
public:
|
||||||
using SectionShow = Window::SectionShow;
|
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;
|
[[nodiscard]] Main::Session &session() const;
|
||||||
|
|
||||||
|
@ -459,6 +462,8 @@ private:
|
||||||
int _thirdColumnWidth = 0;
|
int _thirdColumnWidth = 0;
|
||||||
Ui::Animations::Simple _a_dialogsWidth;
|
Ui::Animations::Simple _a_dialogsWidth;
|
||||||
|
|
||||||
|
std::shared_ptr<Data::CloudImageView> _selfUserpicView;
|
||||||
|
|
||||||
object_ptr<Ui::PlainShadow> _sideShadow;
|
object_ptr<Ui::PlainShadow> _sideShadow;
|
||||||
object_ptr<Ui::PlainShadow> _thirdShadow = { nullptr };
|
object_ptr<Ui::PlainShadow> _thirdShadow = { nullptr };
|
||||||
object_ptr<Ui::ResizeArea> _firstColumnResizeArea = { nullptr };
|
object_ptr<Ui::ResizeArea> _firstColumnResizeArea = { nullptr };
|
||||||
|
|
Loading…
Add table
Reference in a new issue