Skip to content
Snippets Groups Projects
Commit 00502fca authored by Ming Rui Zhang's avatar Ming Rui Zhang
Browse files

callwidget: fix the issue that smartlist context menu does not show corresponding view

for issue #529

Change-Id: I5ad4c105961719b0eba0b28c8ed35765298b92e6
parent dc11de92
No related branches found
No related tags found
No related merge requests found
...@@ -383,22 +383,26 @@ CallWidget::setupSmartListContextMenu(const QPoint& pos) ...@@ -383,22 +383,26 @@ CallWidget::setupSmartListContextMenu(const QPoint& pos)
menu.addAction(videoCallAction); menu.addAction(videoCallAction);
connect(videoCallAction, &QAction::triggered, connect(videoCallAction, &QAction::triggered,
[this, convUid, conversation, convModel]() { [this, convUid, conversation, convModel]() {
convModel->placeCall(convUid); if (!ui->messageView->isVisible())
showChatView(LRCInstance::getCurrAccId(), conversation);
ui->callingPhoto->setPixmap(QPixmap::fromImage(imageForConv(convUid))); ui->callingPhoto->setPixmap(QPixmap::fromImage(imageForConv(convUid)));
if (convUid != LRCInstance::getCurrentConvUid()) { if (convUid != LRCInstance::getCurrentConvUid()) {
selectConversation(conversation); selectConversation(conversation);
} }
convModel->placeCall(convUid);
}); });
// audio call // audio call
auto audioCallAction = new QAction(tr("Start audio call"), this); auto audioCallAction = new QAction(tr("Start audio call"), this);
menu.addAction(audioCallAction); menu.addAction(audioCallAction);
connect(audioCallAction, &QAction::triggered, connect(audioCallAction, &QAction::triggered,
[this, convUid, conversation, convModel]() { [this, convUid, conversation, convModel]() {
convModel->placeAudioOnlyCall(convUid); if (!ui->messageView->isVisible())
showChatView(LRCInstance::getCurrAccId(), conversation);
ui->callingPhoto->setPixmap(QPixmap::fromImage(imageForConv(convUid))); ui->callingPhoto->setPixmap(QPixmap::fromImage(imageForConv(convUid)));
if (convUid != LRCInstance::getCurrentConvUid()) { if (convUid != LRCInstance::getCurrentConvUid()) {
selectConversation(conversation); selectConversation(conversation);
} }
convModel->placeAudioOnlyCall(convUid);
}); });
// clear conversation // clear conversation
auto clearConversationAction = new QAction(tr("Clear conversation"), this); auto clearConversationAction = new QAction(tr("Clear conversation"), this);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment