| 1816 | } |
| 1817 | |
| 1818 | bool 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 | |
| 1848 | void Application::quitPreventFinished() { |
| 1849 | if (Quitting()) { |
no test coverage detected