Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-client-windows
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-client-windows
Commits
dc11de92
Commit
dc11de92
authored
5 years ago
by
Ming Rui Zhang
Browse files
Options
Downloads
Patches
Plain Diff
callwidget: call setCurrentCall function only when needed to show call view
Change-Id: Ic6d6879f1ab4872997532bb2c754610b88321a2d
parent
5f4da8b5
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/callwidget.cpp
+6
-19
6 additions, 19 deletions
src/callwidget.cpp
with
6 additions
and
19 deletions
src/callwidget.cpp
+
6
−
19
View file @
dc11de92
...
@@ -663,8 +663,14 @@ CallWidget::slotShowCallView(const QString& accountId,
...
@@ -663,8 +663,14 @@ CallWidget::slotShowCallView(const QString& accountId,
const
lrc
::
api
::
conversation
::
Info
&
convInfo
)
const
lrc
::
api
::
conversation
::
Info
&
convInfo
)
{
{
Q_UNUSED
(
accountId
);
Q_UNUSED
(
accountId
);
qDebug
()
<<
"slotShowCallView"
;
qDebug
()
<<
"slotShowCallView"
;
if
(
!
convInfo
.
callId
.
isEmpty
())
{
auto
&
accInfo
=
LRCInstance
::
getAccountInfo
(
convInfo
.
accountId
);
accInfo
.
callModel
->
setCurrentCall
(
convInfo
.
callId
);
}
// control visible callwidget buttons
// control visible callwidget buttons
setCallPanelVisibility
(
true
);
setCallPanelVisibility
(
true
);
...
@@ -1226,17 +1232,6 @@ CallWidget::selectConversation(const lrc::api::conversation::Info& item)
...
@@ -1226,17 +1232,6 @@ CallWidget::selectConversation(const lrc::api::conversation::Info& item)
LRCInstance
::
setSelectedConvId
(
item
.
uid
);
LRCInstance
::
setSelectedConvId
(
item
.
uid
);
accInfo
.
conversationModel
->
selectConversation
(
item
.
uid
);
accInfo
.
conversationModel
->
selectConversation
(
item
.
uid
);
accInfo
.
conversationModel
->
clearUnreadInteractions
(
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
();
ui
->
conversationsFilterWidget
->
update
();
return
true
;
return
true
;
}
}
...
@@ -1392,14 +1387,6 @@ CallWidget::connectAccount(const QString& accountId)
...
@@ -1392,14 +1387,6 @@ CallWidget::connectAccount(const QString& accountId)
auto
convInfo
=
LRCInstance
::
getConversationFromCallId
(
callId
,
accountId
);
auto
convInfo
=
LRCInstance
::
getConversationFromCallId
(
callId
,
accountId
);
if
(
!
convInfo
.
uid
.
isEmpty
()
&&
convInfo
.
uid
==
LRCInstance
::
getCurrentConvUid
())
{
if
(
!
convInfo
.
uid
.
isEmpty
()
&&
convInfo
.
uid
==
LRCInstance
::
getCurrentConvUid
())
{
accInfo
.
conversationModel
->
selectConversation
(
convInfo
.
uid
);
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
);
LRCInstance
::
renderer
()
->
addDistantRenderer
(
callId
);
ui
->
videoView
->
updateCall
();
ui
->
videoView
->
updateCall
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment