| 1448 | } |
| 1449 | |
| 1450 | Window::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 | |
| 1469 | Window::Controller *Application::windowForShowingForum( |
| 1470 | not_null<Data::Forum*> forum) const { |
no test coverage detected