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
1 changed files with 7 additions and 0 deletions

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);
});