Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-libclient
Commits
605461ff
Commit
605461ff
authored
Sep 26, 2019
by
Sébastien Blin
Committed by
Andreas Traczyk
Oct 16, 2019
Browse files
conversationmodel: clean confId and fix selection when ending a call
Change-Id: I8e0e6f0e54a5f537b1719a3e46d452a9db8f2072
parent
716ce26d
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/conversationmodel.cpp
View file @
605461ff
...
...
@@ -428,9 +428,17 @@ ConversationModel::selectConversation(const std::string& uid) const
}
auto
&
conversation
=
pimpl_
->
conversations
.
at
(
conversationIdx
);
if
(
not
conversation
.
confId
.
empty
())
{
bool
callEnded
=
true
;
if
(
!
conversation
.
callId
.
empty
())
{
try
{
auto
call
=
owner
.
callModel
->
getCall
(
conversation
.
callId
);
callEnded
=
call
.
status
==
call
::
Status
::
ENDED
;
}
catch
(...)
{}
}
if
(
not
callEnded
and
not
conversation
.
confId
.
empty
())
{
emit
pimpl_
->
behaviorController
.
showCallView
(
owner
.
id
,
conversation
);
}
else
if
(
c
onversation
.
callId
.
empty
()
)
{
}
else
if
(
c
allEnded
)
{
emit
pimpl_
->
behaviorController
.
showChatView
(
owner
.
id
,
conversation
);
}
else
{
try
{
...
...
@@ -1561,7 +1569,9 @@ ConversationModelPimpl::slotCallEnded(const std::string& callId)
for
(
auto
&
conversation
:
conversations
)
if
(
conversation
.
callId
==
callId
)
{
conversation
.
callId
=
""
;
conversation
.
confId
=
""
;
// The participant is detached
dirtyConversations
=
{
true
,
true
};
emit
linked
.
conversationUpdated
(
conversation
.
uid
);
}
}
catch
(
std
::
out_of_range
&
e
)
{
qDebug
()
<<
"ConversationModelPimpl::slotCallEnded can't end inexistant call"
;
...
...
src/newcallmodel.cpp
View file @
605461ff
...
...
@@ -697,7 +697,6 @@ NewCallModelPimpl::slotCallStateChanged(const std::string& callId, const std::st
setCurrentCall
(
callId
);
call
->
startTime
=
std
::
chrono
::
steady_clock
::
now
();
setCurrentCall
(
callId
);
emit
linked
.
callStarted
(
callId
);
sendProfile
(
callId
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment