2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Fixed opening message from media player widget in corresponding window.

This commit is contained in:
23rd
2024-04-15 23:41:00 +03:00
parent 86b9d16747
commit ce596e29c4

View File

@@ -811,6 +811,13 @@ void MainWidget::createPlayer() {
});
_player->entity()->setShowItemCallback([=](
not_null<const HistoryItem*> item) {
const auto peer = item->history()->peer;
if (const auto window = Core::App().windowFor(peer)) {
if (const auto controller = window->sessionController()) {
controller->showMessage(item);
return;
}
}
_controller->showMessage(item);
});