Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
jami-client-windows
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
savoirfairelinux
jami-client-windows
Commits
efbfa72f
Commit
efbfa72f
authored
Apr 06, 2020
by
Ming Rui Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
callwidget: better handling for setCurrentCall
Change-Id: I4413cae64c98a2888d6c2f749690f030ebca6cd1
parent
2de13a70
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
src/callwidget.cpp
src/callwidget.cpp
+17
-6
No files found.
src/callwidget.cpp
View file @
efbfa72f
...
...
@@ -1227,12 +1227,15 @@ CallWidget::selectConversation(const lrc::api::conversation::Info& item)
accInfo
.
conversationModel
->
selectConversation
(
item
.
uid
);
accInfo
.
conversationModel
->
clearUnreadInteractions
(
item
.
uid
);
if
(
!
item
.
callId
.
isEmpty
())
{
QtConcurrent
::
run
(
[
convUid
=
item
.
uid
,
accId
=
item
.
accountId
]
{
auto
item
=
LRCInstance
::
getConversationFromConvUid
(
convUid
);
auto
&
accInfo
=
LRCInstance
::
getAccountInfo
(
item
.
accountId
);
accInfo
.
callModel
->
setCurrentCall
(
item
.
callId
);
});
// when changing conversation, current call should only be set when there is a call on pause
if
(
accInfo
.
callModel
->
getCall
(
item
.
callId
).
status
==
lrc
::
api
::
call
::
Status
::
PAUSED
)
{
QtConcurrent
::
run
(
[
convUid
=
item
.
uid
,
accId
=
item
.
accountId
]{
auto
item
=
LRCInstance
::
getConversationFromConvUid
(
convUid
);
auto
&
accInfo
=
LRCInstance
::
getAccountInfo
(
item
.
accountId
);
accInfo
.
callModel
->
setCurrentCall
(
item
.
callId
);
});
}
}
ui
->
conversationsFilterWidget
->
update
();
return
true
;
...
...
@@ -1389,6 +1392,14 @@ CallWidget::connectAccount(const QString& accountId)
auto
convInfo
=
LRCInstance
::
getConversationFromCallId
(
callId
,
accountId
);
if
(
!
convInfo
.
uid
.
isEmpty
()
&&
convInfo
.
uid
==
LRCInstance
::
getCurrentConvUid
())
{
accInfo
.
conversationModel
->
selectConversation
(
convInfo
.
uid
);
if
(
!
convInfo
.
callId
.
isEmpty
())
{
QtConcurrent
::
run
(
[
convUid
=
convInfo
.
uid
,
accId
=
convInfo
.
accountId
]{
auto
item
=
LRCInstance
::
getConversationFromConvUid
(
convUid
);
auto
&
accInfo
=
LRCInstance
::
getAccountInfo
(
item
.
accountId
);
accInfo
.
callModel
->
setCurrentCall
(
item
.
callId
);
});
}
}
LRCInstance
::
renderer
()
->
addDistantRenderer
(
callId
);
ui
->
videoView
->
updateCall
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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