mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-23 00:36:53 +00:00
Focus chats search by Ctrl[Cmd]+F.
This commit is contained in:
parent
b3eb1dbc14
commit
a62d1dfa63
@ -995,11 +995,17 @@ void Widget::setupShortcuts() {
|
||||
}) | rpl::start_with_next([=](not_null<Shortcuts::Request*> request) {
|
||||
using Command = Shortcuts::Command;
|
||||
|
||||
if (_openedForum && !controller()->activeChatCurrent()) {
|
||||
if (!controller()->activeChatCurrent()) {
|
||||
request->check(Command::Search) && request->handle([=] {
|
||||
const auto history = _openedForum->history();
|
||||
controller()->searchInChat(history);
|
||||
return true;
|
||||
if (const auto forum = _openedForum) {
|
||||
const auto history = forum->history();
|
||||
controller()->searchInChat(history);
|
||||
return true;
|
||||
} else if (!_openedFolder && _search->isVisible()) {
|
||||
_search->setFocus();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}, lifetime());
|
||||
|
Loading…
Reference in New Issue
Block a user