2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 15:35:51 +00:00

Add Ctrl+9 shortcut to show archive.

This commit is contained in:
Anton Afanasyev
2020-01-05 08:14:52 +03:00
committed by John Preston
parent a52dfe7998
commit 3bc58fb690
3 changed files with 18 additions and 0 deletions

View File

@@ -2953,6 +2953,16 @@ void InnerWidget::setupShortcuts() {
App::main()->choosePeer(session().userPeerId(), ShowAtUnreadMsgId);
return true;
});
request->check(Command::ShowArchive) && request->handle([=] {
const auto folder = session().data().folderLoaded(
Data::Folder::kId);
if (folder && !folder->chatsList()->empty()) {
App::wnd()->sessionController()->openFolder(folder);
Ui::hideSettingsAndLayer();
return true;
}
return false;
});
static const auto kPinned = {
Command::ChatPinned1,