2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 00:55:12 +00:00

Add return from bot switch_pm to Scheduled/Replies.

This commit is contained in:
John Preston
2020-11-12 18:46:17 +03:00
parent 4a8b59b788
commit f04b3da76a
25 changed files with 1158 additions and 1139 deletions

View File

@@ -1814,24 +1814,17 @@ void InnerWidget::contextMenuEvent(QContextMenuEvent *e) {
} else {
fillArchiveSearchMenu(_menu.get());
}
} else if (const auto history = row.key.history()) {
Window::FillPeerMenu(
} else {
Window::FillDialogsEntryMenu(
_controller,
Window::PeerMenuRequest{
.peer = history->peer,
.source = Window::PeerMenuRequest::Source::ChatsList,
Dialogs::EntryState{
.key = row.key,
.section = Dialogs::EntryState::Section::ChatsList,
.filterId = _filterId,
},
[&](const QString &text, Fn<void()> callback) {
return _menu->addAction(text, std::move(callback));
});
} else if (const auto folder = row.key.folder()) {
Window::FillFolderMenu(
_controller,
Window::FolderMenuRequest{ folder },
[&](const QString &text, Fn<void()> callback) {
return _menu->addAction(text, std::move(callback));
});
}
connect(_menu.get(), &QObject::destroyed, [=] {
if (_menuRow.key) {