Fix activating chat list entry from global search.

This commit is contained in:
John Preston 2023-02-04 21:19:36 +04:00
parent 326b4eb10d
commit 6f797a17ad

View file

@ -2330,9 +2330,12 @@ void HistoryWidget::showHistory(
updateOverStates(mapFromGlobal(QCursor::pos())); updateOverStates(mapFromGlobal(QCursor::pos()));
if (_history) { if (_history) {
const auto msgId = (_showAtMsgId == ShowAtTheEndMsgId)
? ShowAtUnreadMsgId
: _showAtMsgId;
controller()->setActiveChatEntry({ controller()->setActiveChatEntry({
_history, _history,
FullMsgId(_history->peer->id, _showAtMsgId) }); FullMsgId(_history->peer->id, msgId) });
} }
update(); update();
controller()->floatPlayerAreaUpdated(); controller()->floatPlayerAreaUpdated();