diff --git a/callwidget.cpp b/callwidget.cpp index a2d7daace8e1a2e779deb87d890d1ffe3190b8d2..cd0283b0e357dc62a5de7fc088e2c59bba8f3e81 100644 --- a/callwidget.cpp +++ b/callwidget.cpp @@ -287,6 +287,13 @@ CallWidget::setupSmartListContextMenu(const QPoint& pos) [convUid]() { LRCInstance::getCurrentConversationModel()->clearHistory(convUid); }); + // remove contact + auto removeContactAction = new QAction(tr("Remove contact"), this); + menu.addAction(removeContactAction); + connect(removeContactAction, &QAction::triggered, + [convUid]() { + LRCInstance::getCurrentConversationModel()->removeConversation(convUid, false); + }); // block contact auto blockContactAction = new QAction(tr("Block contact"), this); menu.addAction(blockContactAction); @@ -541,7 +548,7 @@ void CallWidget::slotBlockInviteClicked(const QModelIndex & index) void CallWidget::slotIgnoreInviteClicked(const QModelIndex & index) { auto convUid = index.data(static_cast<int>(SmartListModel::Role::UID)).value<QString>(); - LRCInstance::getCurrentConversationModel()->removeConversation(convUid.toStdString()); + LRCInstance::getCurrentConversationModel()->removeConversation(convUid.toStdString(), false); } void CallWidget::slotCustomContextMenuRequested(const QPoint& pos)