mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 15:35:51 +00:00
Activate the chosen default folder on Escape.
This commit is contained in:
@@ -48,6 +48,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "data/data_histories.h"
|
||||
#include "data/data_changes.h"
|
||||
#include "data/data_download_manager.h"
|
||||
#include "data/data_chat_filters.h"
|
||||
#include "info/downloads/info_downloads_widget.h"
|
||||
#include "info/info_memento.h"
|
||||
#include "facades.h"
|
||||
@@ -854,8 +855,13 @@ void Widget::escape() {
|
||||
} else if (!cancelSearch()) {
|
||||
if (controller()->activeChatEntryCurrent().key) {
|
||||
controller()->content()->dialogsCancelled();
|
||||
} else if (controller()->activeChatsFilterCurrent()) {
|
||||
controller()->setActiveChatsFilter(FilterId(0));
|
||||
} else {
|
||||
const auto filters = &session().data().chatsFilters();
|
||||
const auto &list = filters->list();
|
||||
const auto first = list.empty() ? FilterId() : list.front().id();
|
||||
if (controller()->activeChatsFilterCurrent() != first) {
|
||||
controller()->setActiveChatsFilter(first);
|
||||
}
|
||||
}
|
||||
} else if (!_searchInChat && !controller()->selectingPeer()) {
|
||||
if (controller()->activeChatEntryCurrent().key) {
|
||||
|
Reference in New Issue
Block a user