Skip to content
Snippets Groups Projects
Commit 1b56c4aa authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

calls: fix returning to main view from setting while in a call

This fixes the call stack view not being reset when exiting the
settings.

Gitlab: #417
Change-Id: I1af534a1a164a28e1d29b9a4064cc0c78496557c
parent c8008c54
No related branches found
No related tags found
No related merge requests found
...@@ -232,6 +232,9 @@ CallAdapter::onShowIncomingCallView(const QString& accountId, const QString& con ...@@ -232,6 +232,9 @@ CallAdapter::onShowIncomingCallView(const QString& accountId, const QString& con
if (call.isOutgoing) { if (call.isOutgoing) {
if (isCallSelected) { if (isCallSelected) {
// don't reselect // don't reselect
// TODO: this signal can be renamed to conversationReselected,
// isCallSelected and any other similar logic can be removed
// and calling selectConversation should be sufficient
Q_EMIT lrcInstance_->conversationUpdated(convInfo.uid, accountId); Q_EMIT lrcInstance_->conversationUpdated(convInfo.uid, accountId);
} }
} else { } else {
......
...@@ -434,6 +434,11 @@ LRCInstance::poplastConference(const QString& confId) ...@@ -434,6 +434,11 @@ LRCInstance::poplastConference(const QString& confId)
void void
LRCInstance::selectConversation(const QString& convId, const QString& accountId) LRCInstance::selectConversation(const QString& convId, const QString& accountId)
{ {
// reselection can be used to update the conversation
if (convId == selectedConvUid_ && accountId == currentAccountId_) {
Q_EMIT conversationUpdated(convId, accountId);
return;
}
// if the account is not currently selected, do that first, then // if the account is not currently selected, do that first, then
// proceed to select the conversation // proceed to select the conversation
if (!accountId.isEmpty() && accountId != getCurrentAccountId()) { if (!accountId.isEmpty() && accountId != getCurrentAccountId()) {
......
...@@ -138,7 +138,7 @@ Rectangle { ...@@ -138,7 +138,7 @@ Rectangle {
if (checkCurrentCall && currentAccountIsCalling()) { if (checkCurrentCall && currentAccountIsCalling()) {
var callConv = UtilsAdapter.getCallConvForAccount( var callConv = UtilsAdapter.getCallConvForAccount(
LRCInstance.currentAccountId) LRCInstance.currentAccountId)
LRCInstance.selectConversation(callConv) LRCInstance.selectConversation(callConv, currentAccountId)
CallAdapter.updateCall(callConv, currentAccountId) CallAdapter.updateCall(callConv, currentAccountId)
} else { } else {
showWelcomeView() showWelcomeView()
......
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