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

Function CheckMainWidget

Telegram/SourceFiles/facades.cpp:40–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38namespace {
39
40[[nodiscard]] MainWidget *CheckMainWidget(not_null<Main::Session*> session) {
41 if (const auto m = App::main()) { // multi good
42 if (&m->session() == session) {
43 return m;
44 }
45 }
46 if (&Core::App().domain().active() != &session->account()) {
47 Core::App().domain().activate(&session->account());
48 }
49 if (const auto m = App::main()) { // multi good
50 if (&m->session() == session) {
51 return m;
52 }
53 }
54 return nullptr;
55}
56
57} // namespace
58

Callers 1

searchByHashtagFunction · 0.85

Calls 5

AppClass · 0.85
mainFunction · 0.70
sessionMethod · 0.45
activeMethod · 0.45
activateMethod · 0.45

Tested by

no test coverage detected