From a11ca58f36d12734be9df8d38d01a2dfc31c3a63 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 29 Dec 2018 17:20:35 +0400 Subject: [PATCH] Fix Ctrl+Insert in hashtag search results. --- Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp index 4886a6531..f79b43fd1 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp @@ -2319,12 +2319,10 @@ void DialogsInner::scrollToEntry(const Dialogs::RowDescriptor &entry) { fromY = dialogsOffset() + row->pos() * st::dialogsRowHeight; } } else if (_state == State::Filtered) { - if (entry.fullId.msg) { - for (int32 i = 0, c = _searchResults.size(); i < c; ++i) { - if (_searchResults[i]->item()->fullId() == entry.fullId) { - fromY = searchedOffset() + i * st::dialogsRowHeight; - break; - } + for (int32 i = 0, c = _searchResults.size(); i < c; ++i) { + if (isSearchResultActive(_searchResults[i].get(), entry)) { + fromY = searchedOffset() + i * st::dialogsRowHeight; + break; } } if (fromY < 0) {