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
dc11de92
Commit
dc11de92
authored
Apr 06, 2020
by
Ming Rui Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
callwidget: call setCurrentCall function only when needed to show call view
Change-Id: Ic6d6879f1ab4872997532bb2c754610b88321a2d
parent
5f4da8b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
19 deletions
+6
-19
src/callwidget.cpp
src/callwidget.cpp
+6
-19
No files found.
src/callwidget.cpp
View file @
dc11de92
...
...
@@ -663,8 +663,14 @@ CallWidget::slotShowCallView(const QString& accountId,
const
lrc
::
api
::
conversation
::
Info
&
convInfo
)
{
Q_UNUSED
(
accountId
);
qDebug
()
<<
"slotShowCallView"
;
if
(
!
convInfo
.
callId
.
isEmpty
())
{
auto
&
accInfo
=
LRCInstance
::
getAccountInfo
(
convInfo
.
accountId
);
accInfo
.
callModel
->
setCurrentCall
(
convInfo
.
callId
);
}
// control visible callwidget buttons
setCallPanelVisibility
(
true
);
...
...
@@ -1226,17 +1232,6 @@ CallWidget::selectConversation(const lrc::api::conversation::Info& item)
LRCInstance
::
setSelectedConvId
(
item
.
uid
);
accInfo
.
conversationModel
->
selectConversation
(
item
.
uid
);
accInfo
.
conversationModel
->
clearUnreadInteractions
(
item
.
uid
);
if
(
!
item
.
callId
.
isEmpty
())
{
// 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
;
}
...
...
@@ -1392,14 +1387,6 @@ 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