mirror of
				https://git.jami.net/savoirfairelinux/jami-client-qt.git
				synced 2025-10-30 07:53:33 +08:00 
			
		
		
		
	ConversationModel: use index in slotCallEnded
Change-Id: I2d2952007ce1c437bac9c96d35c2931816f185ac
This commit is contained in:
		| @ -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."; | ||||
|     } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Adrien Béraud
					Adrien Béraud