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)); + } } }