Leave chats search query in support mode.

This commit is contained in:
John Preston 2018-11-20 16:40:54 +04:00
parent 5c718c7c9a
commit 7ca821f38c
3 changed files with 4 additions and 4 deletions

View file

@ -2521,8 +2521,8 @@ bool DialogsInner::chooseRow() {
HistoryFeed::Memento(feed, chosen.message), HistoryFeed::Memento(feed, chosen.message),
Window::SectionShow::Way::ClearStack); Window::SectionShow::Way::ClearStack);
} }
if (openSearchResult) { if (openSearchResult && !Auth().supportMode()) {
emit searchResultChosen(); emit clearSearchQuery();
} }
updateSelectedRow(); updateSelectedRow();
_selected = nullptr; _selected = nullptr;

View file

@ -114,7 +114,7 @@ signals:
void mustScrollTo(int scrollToTop, int scrollToBottom); void mustScrollTo(int scrollToTop, int scrollToBottom);
void dialogMoved(int movedFrom, int movedTo); void dialogMoved(int movedFrom, int movedTo);
void searchMessages(); void searchMessages();
void searchResultChosen(); void clearSearchQuery();
void cancelSearchInChat(); void cancelSearchInChat();
void completeHashtag(QString tag); void completeHashtag(QString tag);
void refreshHashtags(); void refreshHashtags();

View file

@ -159,7 +159,7 @@ DialogsWidget::DialogsWidget(QWidget *parent, not_null<Window::Controller*> cont
connect(_inner, SIGNAL(mustScrollTo(int,int)), _scroll, SLOT(scrollToY(int,int))); connect(_inner, SIGNAL(mustScrollTo(int,int)), _scroll, SLOT(scrollToY(int,int)));
connect(_inner, SIGNAL(dialogMoved(int,int)), this, SLOT(onDialogMoved(int,int))); connect(_inner, SIGNAL(dialogMoved(int,int)), this, SLOT(onDialogMoved(int,int)));
connect(_inner, SIGNAL(searchMessages()), this, SLOT(onNeedSearchMessages())); connect(_inner, SIGNAL(searchMessages()), this, SLOT(onNeedSearchMessages()));
connect(_inner, SIGNAL(searchResultChosen()), this, SLOT(onCancel())); connect(_inner, SIGNAL(clearSearchQuery()), this, SLOT(onCancel()));
connect(_inner, SIGNAL(completeHashtag(QString)), this, SLOT(onCompleteHashtag(QString))); connect(_inner, SIGNAL(completeHashtag(QString)), this, SLOT(onCompleteHashtag(QString)));
connect(_inner, SIGNAL(refreshHashtags()), this, SLOT(onFilterCursorMoved())); connect(_inner, SIGNAL(refreshHashtags()), this, SLOT(onFilterCursorMoved()));
connect(_inner, SIGNAL(cancelSearchInChat()), this, SLOT(onCancelSearchInChat())); connect(_inner, SIGNAL(cancelSearchInChat()), this, SLOT(onCancelSearchInChat()));