fix(@desktop/chat): Right click message actions dont work
Fix the bug introduced by removing MessageContextMenu from Chat column. Added missing logic for edit message via MessageContextMenu fixes #3223
This commit is contained in:
parent
d4de0c25a4
commit
82718a0e93
|
@ -23,7 +23,6 @@ Item {
|
||||||
id: chatColumnLayout
|
id: chatColumnLayout
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
property var messageContextMenu
|
|
||||||
property alias pinnedMessagesPopupComponent: pinnedMessagesPopupComponent
|
property alias pinnedMessagesPopupComponent: pinnedMessagesPopupComponent
|
||||||
property int chatGroupsListViewCount: 0
|
property int chatGroupsListViewCount: 0
|
||||||
property bool isReply: false
|
property bool isReply: false
|
||||||
|
@ -341,7 +340,9 @@ Item {
|
||||||
sourceComponent: ChatMessages {
|
sourceComponent: ChatMessages {
|
||||||
id: chatMessages
|
id: chatMessages
|
||||||
messageList: messages
|
messageList: messages
|
||||||
messageContextMenuInst: messageContextMenu
|
messageContextMenuInst: MessageContextMenu {
|
||||||
|
reactionModel: EmojiReactions { }
|
||||||
|
}
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
chatColumnLayout.userList = chatMessages.messageList.userList;
|
chatColumnLayout.userList = chatMessages.messageList.userList;
|
||||||
}
|
}
|
||||||
|
|
|
@ -214,6 +214,7 @@ Item {
|
||||||
messageContextMenu.isCurrentUser = isCurrentUser;
|
messageContextMenu.isCurrentUser = isCurrentUser;
|
||||||
messageContextMenu.isRightClickOnImage = isRightClickOnImage
|
messageContextMenu.isRightClickOnImage = isRightClickOnImage
|
||||||
messageContextMenu.imageSource = imageSource
|
messageContextMenu.imageSource = imageSource
|
||||||
|
messageContextMenu.onClickEdit = function() {root.isEdit = true}
|
||||||
|
|
||||||
if (isReply) {
|
if (isReply) {
|
||||||
let nickname = appMain.getUserNickname(repliedMessageAuthor)
|
let nickname = appMain.getUserNickname(repliedMessageAuthor)
|
||||||
|
|
|
@ -13,13 +13,17 @@ import "../components"
|
||||||
import "./samples/"
|
import "./samples/"
|
||||||
import "./MessageComponents"
|
import "./MessageComponents"
|
||||||
import "../ContactsColumn"
|
import "../ContactsColumn"
|
||||||
|
import "../data"
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
property var userList
|
property var userList
|
||||||
property var currentTime
|
property var currentTime
|
||||||
property var messageContextMenu
|
property var messageContextMenu: MessageContextMenu {
|
||||||
|
id: quickActionMessageOptionsMenu
|
||||||
|
reactionModel: EmojiReactions { }
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
|
@ -41,7 +41,6 @@ StatusAppThreePanelLayout {
|
||||||
centerPanel: ChatColumn {
|
centerPanel: ChatColumn {
|
||||||
id: chatColumn
|
id: chatColumn
|
||||||
chatGroupsListViewCount: contactColumnLoader.item.chatGroupsListViewCount
|
chatGroupsListViewCount: contactColumnLoader.item.chatGroupsListViewCount
|
||||||
messageContextMenu: quickActionMessageOptionsMenu
|
|
||||||
}
|
}
|
||||||
|
|
||||||
showRightPanel: chatColumn.showUsers && (chatsModel.channelView.activeChannel.chatType !== Constants.chatTypeOneToOne)
|
showRightPanel: chatColumn.showUsers && (chatsModel.channelView.activeChannel.chatType !== Constants.chatTypeOneToOne)
|
||||||
|
@ -54,7 +53,7 @@ StatusAppThreePanelLayout {
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: userListComponent
|
id: userListComponent
|
||||||
UserList { currentTime: chatColumn.currentTime; userList: chatColumn.userList; messageContextMenu: quickActionMessageOptionsMenu }
|
UserList { currentTime: chatColumn.currentTime; userList: chatColumn.userList;}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
|
@ -89,11 +88,6 @@ StatusAppThreePanelLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageContextMenu {
|
|
||||||
id: quickActionMessageOptionsMenu
|
|
||||||
reactionModel: EmojiReactions { }
|
|
||||||
}
|
|
||||||
|
|
||||||
ConfirmationDialog {
|
ConfirmationDialog {
|
||||||
id: removeContactConfirmationDialog
|
id: removeContactConfirmationDialog
|
||||||
// % "Remove contact"
|
// % "Remove contact"
|
||||||
|
|
|
@ -238,7 +238,6 @@ StatusPopupMenu {
|
||||||
} else {
|
} else {
|
||||||
showReplyArea()
|
showReplyArea()
|
||||||
}
|
}
|
||||||
messageContextMenu.closeParentPopup()
|
|
||||||
messageContextMenu.close()
|
messageContextMenu.close()
|
||||||
}
|
}
|
||||||
icon.name: "chat"
|
icon.name: "chat"
|
||||||
|
|
Loading…
Reference in New Issue