mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Added ability to set shortcut to archive chat from dialogs list.
This commit is contained in:
@@ -4011,6 +4011,24 @@ void InnerWidget::setupShortcuts() {
|
||||
return true;
|
||||
});
|
||||
|
||||
(!_openedForum)
|
||||
&& request->check(Command::ArchiveChat)
|
||||
&& request->handle([=] {
|
||||
const auto thread = _selected ? _selected->thread() : nullptr;
|
||||
if (!thread) {
|
||||
return false;
|
||||
}
|
||||
const auto history = thread->owningHistory();
|
||||
const auto isArchived = history->folder()
|
||||
&& (history->folder()->id() == Data::Folder::kId);
|
||||
|
||||
Window::ToggleHistoryArchived(
|
||||
_controller->uiShow(),
|
||||
history,
|
||||
!isArchived);
|
||||
return true;
|
||||
});
|
||||
|
||||
request->check(Command::ShowContacts) && request->handle([=] {
|
||||
_controller->show(PrepareContactsBox(_controller));
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user