mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-03-28 14:56:19 +01:00
conversation: simplify indexOfActiveCall
Change-Id: Ic31b708fc7bea67ea00171665aca955dd2633c37
This commit is contained in:
parent
7289a92b2b
commit
cba84f2cb7
2 changed files with 3 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue