mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Several working accounts together.
This commit is contained in:
@@ -64,6 +64,11 @@ void Account::start(std::shared_ptr<MTP::AuthKey> localKey) {
|
||||
finishStarting();
|
||||
}
|
||||
|
||||
void Account::startAdded(std::shared_ptr<MTP::AuthKey> localKey) {
|
||||
_local->startAdded(std::move(localKey));
|
||||
finishStarting();
|
||||
}
|
||||
|
||||
void Account::finishStarting() {
|
||||
_appConfig = std::make_unique<AppConfig>(this);
|
||||
watchProxyChanges();
|
||||
@@ -151,10 +156,11 @@ void Account::createSession(
|
||||
|
||||
_session = std::make_unique<Session>(this, user, std::move(settings));
|
||||
if (!serialized.isEmpty()) {
|
||||
// For now it depends on Auth() which depends on _sessionValue.
|
||||
local().readSelf(_session.get(), serialized, streamVersion);
|
||||
}
|
||||
_sessionValue = _session.get();
|
||||
|
||||
Ensures(_session != nullptr);
|
||||
}
|
||||
|
||||
void Account::destroySession() {
|
||||
|
Reference in New Issue
Block a user