mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Added ability to prevent application lock and account switch.
This commit is contained in:
@@ -385,6 +385,12 @@ void Domain::checkForLastProductionConfig(
|
||||
Core::App().refreshFallbackProductionConfig(mtp->config());
|
||||
}
|
||||
|
||||
void Domain::maybeActivate(not_null<Main::Account*> account) {
|
||||
Core::App().preventOrInvoke(crl::guard(account, [=] {
|
||||
activate(account);
|
||||
}));
|
||||
}
|
||||
|
||||
void Domain::activate(not_null<Main::Account*> account) {
|
||||
if (_active.current() == account.get()) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user