1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-08-04 06:45:45 +02:00

swarmdetailspanel: only change photo if enough permissions

Change-Id: I293ff9e3fbca577c660fc2c204ed75568a176bb7
This commit is contained in:
Sébastien Blin 2022-05-12 04:35:36 -04:00
parent b0d7461e2b
commit 920bb44a3f
2 changed files with 4 additions and 2 deletions

View file

@ -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

View file

@ -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