mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-03 10:14:04 +00:00
parent
2baf56f505
commit
066fd9f7e5
@ -56,7 +56,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
function clickMessage(isProfileClick, isSticker = false, isImage = false, image = null) {
|
||||
function clickMessage(isProfileClick, isSticker = false, isImage = false, image = null, emojiOnly = false) {
|
||||
if (isImage) {
|
||||
imageClick(image);
|
||||
return;
|
||||
@ -77,6 +77,7 @@ Item {
|
||||
}
|
||||
messageContextMenu.isProfile = !!isProfileClick
|
||||
messageContextMenu.isSticker = isSticker
|
||||
messageContextMenu.emojiOnly = emojiOnly
|
||||
messageContextMenu.show(userName, fromAuthor, identicon, "", nickname)
|
||||
// Position the center of the menu where the mouse is
|
||||
messageContextMenu.x = messageContextMenu.x - messageContextMenu.width / 2
|
||||
|
@ -10,6 +10,7 @@ import "./"
|
||||
PopupMenu {
|
||||
property bool isProfile: false
|
||||
property bool isSticker: false
|
||||
property bool emojiOnly: false
|
||||
|
||||
id: messageContextMenu
|
||||
width: messageContextMenu.isProfile ? profileHeader.width : emojiContainer.width
|
||||
@ -31,7 +32,7 @@ PopupMenu {
|
||||
|
||||
Item {
|
||||
id: emojiContainer
|
||||
visible: !messageContextMenu.isProfile
|
||||
visible: messageContextMenu.emojiOnly || !messageContextMenu.isProfile
|
||||
width: emojiRow.width
|
||||
height: visible ? emojiRow.height : 0
|
||||
|
||||
@ -40,7 +41,7 @@ PopupMenu {
|
||||
spacing: Style.current.smallPadding
|
||||
leftPadding: Style.current.smallPadding
|
||||
rightPadding: Style.current.smallPadding
|
||||
bottomPadding: Style.current.padding
|
||||
bottomPadding: messageContextMenu.emojiOnly ? 0 : Style.current.padding
|
||||
|
||||
Repeater {
|
||||
model: reactionModel
|
||||
@ -106,6 +107,7 @@ PopupMenu {
|
||||
|
||||
Separator {
|
||||
anchors.bottom: viewProfileAction.top
|
||||
visible: !messageContextMenu.emojiOnly
|
||||
}
|
||||
|
||||
Action {
|
||||
@ -119,6 +121,7 @@ PopupMenu {
|
||||
icon.source: "../../../img/profileActive.svg"
|
||||
icon.width: 16
|
||||
icon.height: 16
|
||||
enabled: !emojiOnly
|
||||
}
|
||||
Action {
|
||||
text: messageContextMenu.isProfile ?
|
||||
@ -133,6 +136,6 @@ PopupMenu {
|
||||
icon.source: "../../../img/messageActive.svg"
|
||||
icon.width: 16
|
||||
icon.height: 16
|
||||
enabled: !isSticker
|
||||
enabled: !isSticker && !emojiOnly
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user