mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-09 03:23:08 +02: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_)) {
|
if (auto optConv = getCurrentConversationModel()->getConversationForUid(selectedConvUid_)) {
|
||||||
auto& convInfo = optConv->get();
|
auto& convInfo = optConv->get();
|
||||||
return convInfo.indexOfActiveCall({{"confId", confId}, {"uri", uri}, {"device", deviceId}});
|
return convInfo.indexOfActiveCall(confId, uri, deviceId);
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,12 +95,11 @@ struct Info
|
||||||
MapStringString infos {};
|
MapStringString infos {};
|
||||||
MapStringString preferences {};
|
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) {
|
for (auto idx = 0; idx != activeCalls.size(); ++idx) {
|
||||||
const auto& call = activeCalls[idx];
|
const auto& call = activeCalls[idx];
|
||||||
if (call["id"] == commit["confId"] && call["uri"] == commit["uri"]
|
if (call["id"] == confId && call["uri"] == uri && call["device"] == deviceId) {
|
||||||
&& call["device"] == commit["device"]) {
|
|
||||||
return idx;
|
return idx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue