Commit 920bb44a authored by Sébastien Blin's avatar Sébastien Blin
Browse files

swarmdetailspanel: only change photo if enough permissions

Change-Id: I293ff9e3fbca577c660fc2c204ed75568a176bb7
parent b0d7461e
......@@ -32,6 +32,7 @@ Item {
property alias imageId: avatar.imageId
property bool newConversation: false
property bool editable: true
property real avatarSize
property real buttonSize: avatarSize
property bool darkTheme: false
......@@ -139,7 +140,7 @@ Item {
HoverHandler {
target: parent
enabled: parent.visible
enabled: parent.visible && editable
onHoveredChanged: {
overlayHighlighted.visible = hovered
}
......@@ -147,7 +148,7 @@ Item {
TapHandler {
target: parent
enabled: parent.visible
enabled: parent.visible && editable
onTapped: {
imageLayer.visible = false
buttonsRowLayout.visible = true
......
......@@ -48,6 +48,7 @@ Rectangle {
PhotoboothView {
id: currentAccountAvatar
darkTheme: UtilsAdapter.luma(root.color)
editable: UtilsAdapter.getParticipantRole(CurrentAccount.id, CurrentConversation.id, CurrentAccount.uri) === Member.Role.ADMIN
Layout.alignment: Qt.AlignHCenter
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment