Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-qt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-qt
Commits
f706abe5
Commit
f706abe5
authored
1 year ago
by
Sébastien Blin
Browse files
Options
Downloads
Patches
Plain Diff
CallMessageDelegate: do not show button to join current call
GitLab:
#963
Change-Id: If26b9413e5a94e1b9da0842b84eaf8019b08140f
parent
610c27f7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/commoncomponents/CallMessageDelegate.qml
+13
-8
13 additions, 8 deletions
src/app/commoncomponents/CallMessageDelegate.qml
tests/qml/src/tst_CallMessageDelegate.qml
+19
-0
19 additions, 0 deletions
tests/qml/src/tst_CallMessageDelegate.qml
with
32 additions
and
8 deletions
src/app/commoncomponents/CallMessageDelegate.qml
+
13
−
8
View file @
f706abe5
...
...
@@ -26,8 +26,10 @@ import net.jami.Constants 1.1
SBSMessageBase
{
id
:
root
property
var
confId
:
ConfId
property
var
currentCallId
:
CurrentCall
.
id
component
JoinCallButton
:
MaterialButton
{
visible
:
root
.
isActive
visible
:
root
.
isActive
&&
root
.
currentCallId
!==
root
.
confId
toolTipText
:
JamiStrings
.
joinCall
color
:
JamiTheme
.
blackColor
background.opacity
:
hovered
?
0.2
:
0.1
...
...
@@ -56,7 +58,7 @@ SBSMessageBase {
enabled
:
root
.
isActive
function
onActiveCallsChanged
()
{
root
.
isActive
=
LRCInstance
.
indexOfActiveCall
(
C
onfId
,
ActionUri
,
DeviceId
)
!==
-
1
;
root
.
isActive
=
LRCInstance
.
indexOfActiveCall
(
root
.
c
onfId
,
ActionUri
,
DeviceId
)
!==
-
1
;
if
(
root
.
isActive
)
{
bubble
.
mask
.
border
.
color
=
CurrentConversation
.
color
;
bubble
.
mask
.
border
.
width
=
1.5
;
...
...
@@ -65,8 +67,8 @@ SBSMessageBase {
}
}
property
bool
isActive
:
LRCInstance
.
indexOfActiveCall
(
C
onfId
,
ActionUri
,
DeviceId
)
!==
-
1
visible
:
isActive
||
C
onfId
===
""
||
Duration
>
0
property
bool
isActive
:
LRCInstance
.
indexOfActiveCall
(
root
.
c
onfId
,
ActionUri
,
DeviceId
)
!==
-
1
visible
:
isActive
||
root
.
c
onfId
===
""
||
Duration
>
0
property
var
baseColor
:
JamiTheme
.
messageInBgColor
...
...
@@ -113,12 +115,13 @@ SBSMessageBase {
TextEdit
{
id
:
callLabel
objectName
:
"
callLabel
"
topPadding
:
8
bottomPadding
:
8
Layout.fillWidth
:
true
Layout.rightMargin
:
root
.
isActive
?
0
:
root
.
timeWidth
+
16
Layout.rightMargin
:
root
.
isActive
&&
root
.
currentCallId
!==
root
.
confId
?
0
:
root
.
timeWidth
+
16
Layout.leftMargin
:
root
.
isActive
?
10
:
-
5
/* spacing is 10 and we want 5px with icon */
text
:
{
...
...
@@ -139,20 +142,22 @@ SBSMessageBase {
JoinCallButton
{
id
:
joinCallInAudio
objectName
:
"
joinCallInAudio
"
Layout.topMargin
:
4
Layout.bottomMargin
:
4
text
:
JamiStrings
.
joinInAudio
onClicked
:
MessagesAdapter
.
joinCall
(
ActionUri
,
DeviceId
,
C
onfId
,
true
)
onClicked
:
MessagesAdapter
.
joinCall
(
ActionUri
,
DeviceId
,
root
.
c
onfId
,
true
)
}
JoinCallButton
{
id
:
joinCallInVideo
objectName
:
"
joinCallInVideo
"
text
:
JamiStrings
.
joinInVideo
Layout.topMargin
:
4
Layout.bottomMargin
:
4
onClicked
:
MessagesAdapter
.
joinCall
(
ActionUri
,
DeviceId
,
C
onfId
)
onClicked
:
MessagesAdapter
.
joinCall
(
ActionUri
,
DeviceId
,
root
.
c
onfId
)
Layout.rightMargin
:
4
}
}
...
...
@@ -165,7 +170,7 @@ SBSMessageBase {
}
}
Component.onCompleted
:
{
bubble
.
timestampItem
.
visible
=
!
root
.
isActive
;
bubble
.
timestampItem
.
visible
=
!
root
.
isActive
||
root
.
currentCallId
===
root
.
confId
;
opacity
=
1
;
}
}
This diff is collapsed.
Click to expand it.
tests/qml/src/tst_CallMessageDelegate.qml
+
19
−
0
View file @
f706abe5
...
...
@@ -43,5 +43,24 @@ TestWrapper {
compare
(
replyButton
.
visible
,
false
)
}
}
TestCase
{
name
:
"
Check button visibility for swarm call
"
function
test_checkOptionButtonsVisibility
()
{
uut
.
isActive
=
true
uut
.
currentCallId
=
"
foo
"
uut
.
confId
=
"
foo
"
var
callLabel
=
findChild
(
uut
,
"
callLabel
"
)
var
joinCallInAudio
=
findChild
(
uut
,
"
joinCallInAudio
"
)
var
joinCallInVideo
=
findChild
(
uut
,
"
joinCallInVideo
"
)
compare
(
callLabel
.
visible
,
true
)
compare
(
joinCallInAudio
.
visible
,
false
)
compare
(
joinCallInVideo
.
visible
,
false
)
uut
.
confId
=
"
bar
"
compare
(
callLabel
.
visible
,
true
)
compare
(
joinCallInAudio
.
visible
,
true
)
compare
(
joinCallInVideo
.
visible
,
true
)
}
}
}
}
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