mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
MTP global state moved to MTP::Instance class.
Now there will be ability to start multiple mtproto instances.
This commit is contained in:
@@ -226,11 +226,11 @@ namespace {
|
||||
} // namespace
|
||||
|
||||
void logOut() {
|
||||
if (MTP::started()) {
|
||||
MTP::logoutKeys(rpcDone(&loggedOut), rpcFail(&loggedOut));
|
||||
if (auto mtproto = Messenger::Instance().mtp()) {
|
||||
mtproto->logout(rpcDone(&loggedOut), rpcFail(&loggedOut));
|
||||
} else {
|
||||
loggedOut();
|
||||
MTP::start();
|
||||
Messenger::Instance().startMtp();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user