2022-09-16 13:06:52 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Layouts 1.14
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
|
|
|
|
import shared 1.0
|
|
|
|
import utils 1.0
|
|
|
|
import shared.views.chat 1.0
|
|
|
|
|
|
|
|
ActivityNotificationBase {
|
|
|
|
id: root
|
|
|
|
|
2022-09-19 13:16:48 +00:00
|
|
|
property var messageContextMenu
|
2022-09-20 16:11:29 +00:00
|
|
|
|
2022-09-16 13:06:52 +00:00
|
|
|
signal activityCenterClose()
|
|
|
|
|
2022-09-23 12:24:50 +00:00
|
|
|
bodyComponent: MessageView {
|
2022-09-16 13:06:52 +00:00
|
|
|
rootStore: root.store
|
|
|
|
messageStore: root.store.messageStore
|
2022-09-19 13:16:48 +00:00
|
|
|
messageContextMenu: root.messageContextMenu
|
|
|
|
|
2022-09-16 13:06:52 +00:00
|
|
|
messageId: notification.id
|
|
|
|
senderDisplayName: notification.message.senderDisplayName
|
|
|
|
messageText: notification.message.messageText
|
|
|
|
senderId: notification.message.senderId
|
2022-09-19 13:16:48 +00:00
|
|
|
senderOptionalName: notification.message.senderOptionalName
|
2022-09-16 13:06:52 +00:00
|
|
|
senderIcon: notification.message.senderIcon
|
|
|
|
amISender: notification.message.amISender
|
|
|
|
messageImage: notification.message.messageImage
|
|
|
|
messageTimestamp: notification.timestamp
|
|
|
|
messageOutgoingStatus: notification.message.outgoingStatus
|
|
|
|
messageContentType: notification.message.contentType
|
|
|
|
senderTrustStatus: notification.message.senderTrustStatus
|
|
|
|
activityCenterMessage: true
|
|
|
|
activityCenterMessageRead: false
|
|
|
|
onImageClicked: Global.openImagePopup(image, root.messageContextMenu)
|
|
|
|
messageClickHandler: (sender,
|
|
|
|
point,
|
|
|
|
isProfileClick,
|
|
|
|
isSticker = false,
|
|
|
|
isImage = false,
|
|
|
|
image = null,
|
|
|
|
isEmoji = false,
|
|
|
|
ideEmojiPicker = false,
|
|
|
|
isReply = false,
|
|
|
|
isRightClickOnImage = false,
|
|
|
|
imageSource = "") => {
|
|
|
|
if (isProfileClick) {
|
|
|
|
return Global.openProfilePopup(notification.message.senderId)
|
|
|
|
}
|
|
|
|
|
2022-10-26 16:00:20 +00:00
|
|
|
root.activityCenterStore.switchTo(notification)
|
2022-10-29 07:17:35 +00:00
|
|
|
root.activityCenterClose()
|
2022-09-16 13:06:52 +00:00
|
|
|
}
|
2022-09-20 16:11:29 +00:00
|
|
|
}
|
2022-10-26 08:07:46 +00:00
|
|
|
}
|