2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Always keep current self-userpic loaded.

This commit is contained in:
John Preston
2020-06-16 19:40:43 +04:00
parent 571a15bf92
commit 99704e973b
2 changed files with 15 additions and 1 deletions

View File

@@ -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();