Skip to content
Snippets Groups Projects
Commit cba84f2c authored by Adrien Béraud's avatar Adrien Béraud Committed by Adrien Béraud
Browse files

conversation: simplify indexOfActiveCall

Change-Id: Ic31b708fc7bea67ea00171665aca955dd2633c37
parent 7289a92b
Branches
Tags
No related merge requests found
......@@ -412,7 +412,7 @@ LRCInstance::indexOfActiveCall(const QString& confId, const QString& uri, const
{
if (auto optConv = getCurrentConversationModel()->getConversationForUid(selectedConvUid_)) {
auto& convInfo = optConv->get();
return convInfo.indexOfActiveCall({{"confId", confId}, {"uri", uri}, {"device", deviceId}});
return convInfo.indexOfActiveCall(confId, uri, deviceId);
}
return -1;
}
......
......@@ -95,12 +95,11 @@ struct Info
MapStringString infos {};
MapStringString preferences {};
int indexOfActiveCall(const MapStringString& commit)
int indexOfActiveCall(const QString& confId, const QString& uri, const QString& deviceId)
{
for (auto idx = 0; idx != activeCalls.size(); ++idx) {
const auto& call = activeCalls[idx];
if (call["id"] == commit["confId"] && call["uri"] == commit["uri"]
&& call["device"] == commit["device"]) {
if (call["id"] == confId && call["uri"] == uri && call["device"] == deviceId) {
return idx;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment