Skip to content
Snippets Groups Projects
Commit 3e5ee2fb authored by Albert  Babí Oller's avatar Albert Babí Oller Committed by Andreas Traczyk
Browse files

auto_answer: switch to incoming call

- shows callview for auto-answered incoming calls
- if call is not for current account shows a notification

Gitlab: #103
Change-Id: Ia482abc575f13b9d7eebd701ac1d51d2089de2b7
parent 95df47c7
No related branches found
No related tags found
No related merge requests found
......@@ -155,7 +155,7 @@ CallAdapter::slotShowIncomingCallView(const QString& accountId, const conversati
}
} else {
auto accountProperties = LRCInstance::accountModel().getAccountConfig(selectedAccountId);
if (!accountProperties.autoAnswer && !accountProperties.isRendezVous) {
if (!accountProperties.isRendezVous) {
// App not focused or in different account
if (QApplication::focusObject() == nullptr || accountId != selectedAccountId) {
showNotification(accountId, convInfo.uid);
......@@ -184,8 +184,9 @@ CallAdapter::slotShowIncomingCallView(const QString& accountId, const conversati
} else { // Not current conversation
if (currentConvHasCall) {
auto currentCall = callModel->getCall(currentConvInfo.callId);
if (currentCall.status == lrc::api::call::Status::CONNECTED
|| currentCall.status == lrc::api::call::Status::IN_PROGRESS) {
if ((currentCall.status == lrc::api::call::Status::CONNECTED
|| currentCall.status == lrc::api::call::Status::IN_PROGRESS)
&& !accountProperties.autoAnswer) {
showNotification(accountId, convInfo.uid);
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment