2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Resend non-authorization requests on main DC change.

This commit is contained in:
John Preston
2021-08-30 20:32:30 +03:00
parent ae40ea9336
commit 2d0bcf7dca
7 changed files with 56 additions and 39 deletions

View File

@@ -241,6 +241,12 @@ rpl::producer<not_null<MTP::Instance*>> Account::mtpValue() const {
});
}
rpl::producer<not_null<MTP::Instance*>> Account::mtpMainSessionValue() const {
return mtpValue() | rpl::map([=](not_null<MTP::Instance*> instance) {
return instance->mainDcIdValue() | rpl::map_to(instance);
}) | rpl::flatten_latest();
}
rpl::producer<MTPUpdates> Account::mtpUpdates() const {
return _mtpUpdates.events();
}