perf(chatScroll): Create message quick context items only when message row is hovered
This commit is contained in:
parent
c26035e245
commit
8cb4420d49
|
@ -23,7 +23,7 @@ Control {
|
|||
Invitation = 7
|
||||
}
|
||||
|
||||
property alias quickActions: quickActionsPanel.items
|
||||
property list<Item> quickActions
|
||||
property var statusChatInput
|
||||
property alias linksComponent: linksLoader.sourceComponent
|
||||
property alias transcationComponent: transactionBubbleLoader.sourceComponent
|
||||
|
@ -365,13 +365,18 @@ Control {
|
|||
}
|
||||
}
|
||||
|
||||
StatusMessageQuickActions {
|
||||
id: quickActionsPanel
|
||||
Loader {
|
||||
active: root.hovered && !root.hideQuickActions
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 20
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: -8
|
||||
visible: root.hovered && !root.hideQuickActions
|
||||
sourceComponent: Component {
|
||||
StatusMessageQuickActions {
|
||||
id: quickActionsPanel
|
||||
items: root.quickActions
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -727,7 +727,7 @@ Loader {
|
|||
|
||||
quickActions: [
|
||||
Loader {
|
||||
active: !root.isInPinnedPopup
|
||||
active: !root.isInPinnedPopup && delegate.hovered
|
||||
sourceComponent: StatusFlatRoundButton {
|
||||
width: d.chatButtonSize
|
||||
height: d.chatButtonSize
|
||||
|
@ -741,7 +741,7 @@ Loader {
|
|||
}
|
||||
},
|
||||
Loader {
|
||||
active: !root.isInPinnedPopup
|
||||
active: !root.isInPinnedPopup && delegate.hovered
|
||||
sourceComponent: StatusFlatRoundButton {
|
||||
objectName: "replyToMessageButton"
|
||||
width: d.chatButtonSize
|
||||
|
@ -758,7 +758,7 @@ Loader {
|
|||
}
|
||||
},
|
||||
Loader {
|
||||
active: !root.isInPinnedPopup && root.isText && !root.editModeOn && root.amISender
|
||||
active: !root.isInPinnedPopup && root.isText && !root.editModeOn && root.amISender && delegate.hovered
|
||||
visible: active
|
||||
sourceComponent: StatusFlatRoundButton {
|
||||
objectName: "editMessageButton"
|
||||
|
@ -774,6 +774,9 @@ Loader {
|
|||
},
|
||||
Loader {
|
||||
active: {
|
||||
if(!delegate.hovered)
|
||||
return false;
|
||||
|
||||
if (!root.messageStore)
|
||||
return false
|
||||
|
||||
|
@ -819,6 +822,8 @@ Loader {
|
|||
},
|
||||
Loader {
|
||||
active: {
|
||||
if(!delegate.hovered)
|
||||
return false;
|
||||
if (root.isInPinnedPopup)
|
||||
return false;
|
||||
if (!root.messageStore)
|
||||
|
|
Loading…
Reference in New Issue