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

Method windowForShowingHistory

Telegram/SourceFiles/core/application.cpp:1450–1467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1448}
1449
1450Window::Controller *Application::windowForShowingHistory(
1451 not_null<PeerData*> peer) const {
1452 if (const auto separate = separateWindowFor(peer)) {
1453 return separate;
1454 }
1455 auto result = (Window::Controller*)nullptr;
1456 enumerateWindows([&](not_null<Window::Controller*> window) {
1457 if (const auto controller = window->sessionController()) {
1458 const auto current = controller->activeChatCurrent();
1459 if (const auto history = current.history()) {
1460 if (history->peer == peer) {
1461 result = window;
1462 }
1463 }
1464 }
1465 });
1466 return result;
1467}
1468
1469Window::Controller *Application::windowForShowingForum(
1470 not_null<Data::Forum*> forum) const {

Callers 1

Calls 3

activeChatCurrentMethod · 0.80
sessionControllerMethod · 0.45
historyMethod · 0.45

Tested by

no test coverage detected