2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Keep separate MTP::Config's for separate accounts.

This commit is contained in:
John Preston
2020-06-17 13:36:25 +04:00
parent 63cdda2df7
commit 357caf8007
142 changed files with 1901 additions and 1263 deletions

View File

@@ -20,14 +20,9 @@ constexpr auto kRefreshTimeout = 3600 * crl::time(1000);
AppConfig::AppConfig(not_null<Account*> account) : _account(account) {
account->mtpValue(
) | rpl::start_with_next([=](MTP::Instance *instance) {
if (instance) {
_api.emplace(instance);
refresh();
} else {
_api.reset();
_requestId = 0;
}
) | rpl::start_with_next([=](not_null<MTP::Instance*> instance) {
_api.emplace(instance);
refresh();
}, _lifetime);
}