MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / readyToQuit

Method readyToQuit

Telegram/SourceFiles/core/application.cpp:1818–1846  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1816}
1817
1818bool Application::readyToQuit() {
1819 auto prevented = false;
1820 if (_calls->isQuitPrevent()) {
1821 prevented = true;
1822 }
1823 if (_domain->started()) {
1824 for (const auto &[index, account] : _domain->accounts()) {
1825 if (const auto session = account->maybeSession()) {
1826 if (session->updates().isQuitPrevent()) {
1827 prevented = true;
1828 }
1829 if (session->api().isQuitPrevent()) {
1830 prevented = true;
1831 }
1832 if (session->data().stories().isQuitPrevent()) {
1833 prevented = true;
1834 }
1835 if (session->data().reactions().isQuitPrevent()) {
1836 prevented = true;
1837 }
1838 }
1839 }
1840 }
1841 if (prevented) {
1842 quitDelayed();
1843 return false;
1844 }
1845 return true;
1846}
1847
1848void Application::quitPreventFinished() {
1849 if (Quitting()) {

Callers 1

QuitAttemptFunction · 0.80

Calls 7

apiMethod · 0.80
reactionsMethod · 0.80
isQuitPreventMethod · 0.45
startedMethod · 0.45
maybeSessionMethod · 0.45
updatesMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected