fix(@desktop/communities): disable edit for cleared message
This commit is contained in:
parent
102a385943
commit
76f1aec0e3
|
@ -41,6 +41,7 @@ Item {
|
|||
property bool isEdit: false
|
||||
property string replaces: ""
|
||||
property bool isEdited: false
|
||||
property bool showEdit: true
|
||||
|
||||
z: {
|
||||
if (typeof chatLogView === "undefined") {
|
||||
|
@ -438,6 +439,7 @@ Item {
|
|||
linkUrls: root.linkUrls
|
||||
isCurrentUser: root.isCurrentUser
|
||||
contentType: root.contentType
|
||||
showEdit: root.showEdit
|
||||
container: root
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import "../../../../../imports"
|
|||
|
||||
Rectangle {
|
||||
property bool parentIsHovered: false
|
||||
property bool showEdit: true
|
||||
signal hoverChanged(bool hovered)
|
||||
property int containerMargin: 2
|
||||
property int contentType: 2
|
||||
|
@ -103,7 +104,7 @@ Rectangle {
|
|||
|
||||
Loader {
|
||||
id: editBtn
|
||||
active: isText && !isEdit && isCurrentUser
|
||||
active: isText && !isEdit && isCurrentUser && showEdit
|
||||
sourceComponent: StatusIconButton {
|
||||
id: btn
|
||||
icon.name: "edit-message"
|
||||
|
|
|
@ -15,6 +15,7 @@ Item {
|
|||
property bool isHovered: typeof hoveredMessage !== "undefined" && hoveredMessage === messageId
|
||||
property bool isMessageActive: typeof activeMessage !== "undefined" && activeMessage === messageId
|
||||
property bool headerRepeatCondition: (authorCurrentMsg !== authorPrevMsg || shouldRepeatHeader || dateGroupLbl.visible || chatReply.active)
|
||||
property bool showEdit: true
|
||||
|
||||
id: root
|
||||
|
||||
|
@ -40,6 +41,7 @@ Item {
|
|||
anchors.top: messageContainer.top
|
||||
// This is not exactly like the design because the hover becomes messed up with the buttons on top of another Message
|
||||
anchors.topMargin: -Style.current.halfPadding
|
||||
showEdit: root.showEdit
|
||||
}
|
||||
|
||||
Loader {
|
||||
|
|
|
@ -93,6 +93,7 @@ ModalPopup {
|
|||
pinnedBy: model.pinnedBy
|
||||
forceHoverHandler: true
|
||||
isEdited: model.isEdited
|
||||
showEdit: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue