mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 12:03:18 +02:00
ConversationModel: use index in slotCallEnded
Change-Id: I2d2952007ce1c437bac9c96d35c2931816f185ac
This commit is contained in:
parent
73eacd5125
commit
3143d60760
1 changed files with 5 additions and 2 deletions
|
@ -3242,14 +3242,17 @@ ConversationModelPimpl::slotCallEnded(const QString& callId)
|
|||
addOrUpdateCallMessage(callId, call.peerUri.remove("ring:"), !call.isOutgoing, duration);
|
||||
/* Reset the callId stored in the conversation.
|
||||
Do not call selectConversation() since it is already done in slotCallStatusChanged. */
|
||||
for (auto& conversation : conversations)
|
||||
size_t idx = 0;
|
||||
for (auto& conversation : conversations) {
|
||||
if (conversation.callId == callId) {
|
||||
conversation.callId = "";
|
||||
conversation.confId = ""; // The participant is detached
|
||||
invalidateModel();
|
||||
Q_EMIT linked.conversationUpdated(conversation.uid);
|
||||
Q_EMIT linked.dataChanged(indexOf(conversation.uid));
|
||||
Q_EMIT linked.dataChanged(idx);
|
||||
}
|
||||
++idx;
|
||||
}
|
||||
} catch (std::out_of_range& e) {
|
||||
qDebug() << "ConversationModelPimpl::slotCallEnded cannot end nonexistent call.";
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue