From 6f797a17add93827fdd0e207831540b26d6d935e Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 4 Feb 2023 21:19:36 +0400 Subject: [PATCH] Fix activating chat list entry from global search. --- Telegram/SourceFiles/history/history_widget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index bf69515f29..d4d381c2a5 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -2330,9 +2330,12 @@ void HistoryWidget::showHistory( updateOverStates(mapFromGlobal(QCursor::pos())); if (_history) { + const auto msgId = (_showAtMsgId == ShowAtTheEndMsgId) + ? ShowAtUnreadMsgId + : _showAtMsgId; controller()->setActiveChatEntry({ _history, - FullMsgId(_history->peer->id, _showAtMsgId) }); + FullMsgId(_history->peer->id, msgId) }); } update(); controller()->floatPlayerAreaUpdated();