feat(ActivityCenter): Click on reply message jumps to message in chat log

Fixes: #8121
This commit is contained in:
Boris Melnik 2022-11-23 01:01:30 +03:00
parent 726ae26128
commit 87d51ab039
3 changed files with 72 additions and 54 deletions

View File

@ -69,4 +69,9 @@ ActivityNotificationMessage {
}
}
}
onMessageClicked: {
root.activityCenterStore.switchTo(notification)
root.closeActivityCenter()
}
}

View File

@ -17,6 +17,8 @@ ActivityNotificationBase {
property int maximumLineCount: 2
signal messageClicked()
property StatusMessageDetails messageDetails: StatusMessageDetails {
messageText: notification.message.messageText
amISender: notification.message.amISender
@ -43,10 +45,15 @@ ActivityNotificationBase {
closeActivityCenter()
Global.openProfilePopup(notification.message.senderId)
}
bodyComponent: RowLayout {
bodyComponent: MouseArea {
hoverEnabled: root.messageBadgeComponent
cursorShape: Qt.PointingHandCursor
onClicked: root.messageClicked()
height: messageRow.implicitHeight
RowLayout {
id: messageRow
spacing: 8
width: parent.width
Item {
Layout.preferredWidth: root.messageDetails.sender.profileImage.assetSettings.width
@ -112,3 +119,4 @@ ActivityNotificationBase {
}
}
}
}

View File

@ -20,4 +20,9 @@ ActivityNotificationMessage {
root.closeActivityCenter()
}
}
onMessageClicked: {
root.activityCenterStore.switchTo(notification)
root.closeActivityCenter()
}
}