mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-22 20:40:18 +00:00
e5a414a927
- `chatType` added to `Constants` to group chat type related values - `messageContentType` added to `Constants` to group message content type related values - `MessageStore` maintained per message list now - added new `ChatContentView` component used to display chat/channel content - components updated to display messages from the new backend - `StatusChatToolBar` appropriately updated - mute/unmute feature added to chat/channel list as well as to `StatusChatToolBar`
51 lines
1.7 KiB
QML
51 lines
1.7 KiB
QML
import QtQuick 2.3
|
|
import shared 1.0
|
|
import shared.panels 1.0
|
|
|
|
import utils 1.0
|
|
|
|
Loader {
|
|
id: root
|
|
height: active ? item.height : 0
|
|
property int imageHeight: 36
|
|
property int imageWidth: 36
|
|
property string icon: ""
|
|
property bool isIdenticon: false
|
|
|
|
signal clickMessage(bool isProfileClick, bool isSticker, bool isImage, var image, bool emojiOnly, bool hideEmojiPicker, bool isReply)
|
|
|
|
sourceComponent: Component {
|
|
Item {
|
|
id: chatImage
|
|
width: identiconImage.width
|
|
height: identiconImage.height
|
|
|
|
RoundedImage {
|
|
id: identiconImage
|
|
width: root.imageWidth
|
|
height: root.imageHeight
|
|
border.width: root.isIdenticon ? 1 : 0
|
|
border.color: Style.current.border
|
|
source: root.icon
|
|
smooth: false
|
|
antialiasing: true
|
|
|
|
MouseArea {
|
|
cursorShape: Qt.PointingHandCursor
|
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
|
anchors.fill: parent
|
|
onClicked: {
|
|
if (!!messageContextMenu) {
|
|
// Set parent, X & Y positions for the messageContextMenu
|
|
messageContextMenu.parent = root
|
|
messageContextMenu.setXPosition = function() { return root.width + 4}
|
|
messageContextMenu.setYPosition = function() { return root.height/2 + 4}
|
|
}
|
|
root.clickMessage(true, false, false, null, false, false, isReplyImage)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|