feat(edit): enable editing the message in an image message

Fixes #13255

It seems like all our code already supported it, we just blocked it in QML just in case 🤷
This commit is contained in:
Jonathan Rainville 2024-04-18 14:33:00 -04:00
parent 5f980a1a8f
commit 1da3c26da1
2 changed files with 4 additions and 2 deletions

View File

@ -303,6 +303,7 @@ Control {
visible: active
sourceComponent: StatusTextMessage {
messageDetails: root.messageDetails
isEdited: root.isEdited
allowShowMore: !root.isInPinnedPopup
textField.anchors.rightMargin: root.isInPinnedPopup ? /*Style.current.xlPadding*/ 32 : 0 // margin for the "Unpin" floating button
highlightedLink: root.highlightedLink

View File

@ -114,6 +114,7 @@ Loader {
property double nextMessageTimestamp: nextMessageAsJsonObj ? nextMessageAsJsonObj.timestamp : 0
property var nextMessageAsJsonObj
readonly property bool editRestricted: root.isSticker
property bool editModeOn: false
property bool isEdited: false
@ -178,7 +179,7 @@ Loader {
messageContentType: root.messageContentType,
pinnedMessage: root.pinnedMessage,
canPin: !!root.messageStore && root.messageStore.getNumberOfPinnedMessages() < Constants.maxNumberOfPins,
editRestricted: root.isSticker || root.isImage,
editRestricted: root.editRestricted,
}
Global.openMenu(messageContextMenuComponent, this, params)
@ -946,7 +947,7 @@ Loader {
}
},
Loader {
active: !root.isInPinnedPopup && root.isText && !root.editModeOn && root.amISender && delegate.hovered && !delegate.hideQuickActions
active: !root.isInPinnedPopup && !root.editRestricted && !root.editModeOn && root.amISender && delegate.hovered && !delegate.hideQuickActions
&& !root.isViewMemberMessagesePopup && root.rootStore.permissionsStore.viewAndPostCriteriaMet
visible: active
sourceComponent: StatusFlatRoundButton {