diff --git a/src/newcallmodel.cpp b/src/newcallmodel.cpp index 9b75b17019f67187d5bc552029a6a2eeb6c5a81e..ec7a1912aa1549b931b5e75ee6be8ce7b463d1cf 100644 --- a/src/newcallmodel.cpp +++ b/src/newcallmodel.cpp @@ -770,11 +770,6 @@ NewCallModelPimpl::slotCallStateChanged(const QString& callId, const QString& st if (call->status == call::Status::ENDED) { emit linked.callEnded(callId); - // NOTE: this line stops all mediaHandlers after the end of any call. - // The mediaHandler will be linked with the callID soon and each mediaHandler - // will be activated/deactivated with respect to the callID. - // This modification will allow to remove the next line. - PluginModel().toggleCallMediaHandler(""); } else if (call->status == call::Status::IN_PROGRESS) { if (previousStatus == call::Status::INCOMING_RINGING || previousStatus == call::Status::OUTGOING_RINGING) { diff --git a/src/pluginmodel.cpp b/src/pluginmodel.cpp index a3ad2461ce34c961929ea6c664944eef60430a30..11bd518aff82c74cbb9e4aa1aa9e9fc551e0c3ed 100644 --- a/src/pluginmodel.cpp +++ b/src/pluginmodel.cpp @@ -1,20 +1,20 @@ -/**************************************************************************** - * Copyright (C) 2018-2020 Savoir-faire Linux Inc. * - * Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com> * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Lesser General Public * - * License as published by the Free Software Foundation; either * - * version 2.1 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program. If not, see <http://www.gnu.org/licenses/>. * - ***************************************************************************/ +/** + * Copyright (C) 2020 Savoir-faire Linux Inc. + * Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ #include "api/pluginmodel.h" // Std @@ -136,10 +136,9 @@ void PluginModel::toggleCallMediaHandler(const QString& id) { MapStringString toggleInfo = PluginManager::instance().getCallMediaHandlerStatus(); - if (toggleInfo["state"] == "true"){ - PluginManager::instance().toggleCallMediaHandler(toggleInfo["name"], false); - } - if (!id.isEmpty() && id != toggleInfo["name"]) { + if (toggleInfo["name"] == id){ + PluginManager::instance().toggleCallMediaHandler(id, false); + } else { PluginManager::instance().toggleCallMediaHandler(id, true); } }