/
diev
/
stelegramdesktop-tdesktop
Обзор
Документация
Войти
/
diev
/
stelegramdesktop-tdesktop
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
dev
Telegram/SourceFiles/mtproto/facade.cpp
43 строки
737 B
John Preston
Remove MTP::MainInstance() global access point.
23 июн 2020, 20:53
23 июн 2020, 20:53
0ad7dca
Код
Авторство
О чём код?
/* This file is part of Telegram Desktop, the official desktop application for the Telegram messaging service. For license and copyright information please follow this link: https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #include "mtproto/facade.h" #include "storage/localstorage.h" #include "core/application.h" #include "main/main_account.h" namespace MTP { namespace details { namespace { int PauseLevel = 0; rpl::event_stream<> Unpaused; } // namespace bool paused() { return PauseLevel > 0; } void pause() { ++PauseLevel; } void unpause() { --PauseLevel; if (!PauseLevel) { Unpaused.fire({}); } } rpl::producer<> unpaused() { return Unpaused.events(); } } // namespace details } // namespace MTP