From e6f3cd1d56add88747d02d21ddb8a491c78abf0d Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 30 Jun 2020 13:01:59 +0400 Subject: [PATCH] Refresh appconfig after login. --- Telegram/SourceFiles/main/main_app_config.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Telegram/SourceFiles/main/main_app_config.cpp b/Telegram/SourceFiles/main/main_app_config.cpp index 4f86f2bcfc..077c97e0a5 100644 --- a/Telegram/SourceFiles/main/main_app_config.cpp +++ b/Telegram/SourceFiles/main/main_app_config.cpp @@ -24,6 +24,13 @@ AppConfig::AppConfig(not_null account) : _account(account) { _api.emplace(instance); refresh(); }, _lifetime); + + account->sessionChanges( + ) | rpl::filter([=](Session *session) { + return (session != nullptr); + }) | rpl::start_with_next([=] { + refresh(); + }, _lifetime); } void AppConfig::refresh() {