2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-04 08:35:21 +00:00

Pass reply info to Window::PeerMenu.

This commit is contained in:
John Preston
2020-11-11 23:47:40 +03:00
parent 4f22171dd6
commit 4a8b59b788
17 changed files with 236 additions and 197 deletions

View File

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