mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Activate the chosen default folder on Escape.
This commit is contained in:
parent
02daa2a04b
commit
d81b2fbb69
1 changed files with 8 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue