From aa88ee6d880f875c6d0fd38f335ee655ea3f51df Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 23 Mar 2020 14:08:54 +0400 Subject: [PATCH] Reset chosen filter on Escape. --- Telegram/SourceFiles/dialogs/dialogs_widget.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/dialogs/dialogs_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_widget.cpp index 0ddb7fc4b6..e6054dc3db 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_widget.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_widget.cpp @@ -686,7 +686,11 @@ void Widget::escape() { controller()->closeFolder(); } else if (!onCancelSearch() || (!_searchInChat && !App::main()->selectingPeer())) { - emit cancelled(); + if (controller()->activeChatEntryCurrent().key) { + emit cancelled(); + } else if (controller()->activeChatsFilterCurrent()) { + controller()->setActiveChatsFilter(FilterId(0)); + } } }