Skip to content

Commit

Permalink
Allow searching for '@' in the chats filter field.
Browse files Browse the repository at this point in the history
Fixes #4121.
  • Loading branch information
john-preston committed Dec 7, 2017
1 parent 54984ef commit 320105f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,10 @@ void DialogsInner::handlePeerNameChange(not_null<PeerData*> peer, const PeerData
}

void DialogsInner::onFilterUpdate(QString newFilter, bool force) {
auto words = TextUtilities::PrepareSearchWords(newFilter);
const auto mentionsSearch = (newFilter == qstr("@"));
const auto words = mentionsSearch
? QStringList(newFilter)
: TextUtilities::PrepareSearchWords(newFilter);
newFilter = words.isEmpty() ? QString() : words.join(' ');
if (newFilter != _filter || force) {
_filter = newFilter;
Expand Down

0 comments on commit 320105f

Please sign in to comment.