add default properties to message component
This commit is contained in:
parent
3b8408d21a
commit
2f428ef41d
|
@ -11,7 +11,14 @@ ListView {
|
|||
model: chatsModel.messageList
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
delegate: Message {}
|
||||
delegate: Message {
|
||||
userName: model.userName
|
||||
message: model.message
|
||||
identicon: model.identicon
|
||||
isCurrentUser: model.isCurrentUser
|
||||
repeatMessageInfo: model.repeatMessageInfo
|
||||
timestamp: model.timestamp
|
||||
}
|
||||
highlightFollowsCurrentItem: true
|
||||
|
||||
onCountChanged: {
|
||||
|
@ -27,3 +34,9 @@ ListView {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*##^##
|
||||
Designer {
|
||||
D{i:0;autoSize:true;height:480;width:640}
|
||||
}
|
||||
##^##*/
|
||||
|
|
|
@ -7,6 +7,13 @@ import "../../../../shared"
|
|||
import "../../../../imports"
|
||||
|
||||
Rectangle {
|
||||
property string userName: "Jotaro Kujo"
|
||||
property string message: "That's right. We're friends... Of justice, that is."
|
||||
property string identicon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII="
|
||||
property bool isCurrentUser: false
|
||||
property bool repeatMessageInfo: true
|
||||
property int timestamp: 1234567
|
||||
|
||||
id: chatBox
|
||||
height: repeatMessageInfo ? 60 + chatText.height : 5 + chatText.height
|
||||
color: "#00000000"
|
||||
|
@ -82,3 +89,9 @@ Rectangle {
|
|||
visible: repeatMessageInfo
|
||||
}
|
||||
}
|
||||
|
||||
/*##^##
|
||||
Designer {
|
||||
D{i:0;height:80;width:500}
|
||||
}
|
||||
##^##*/
|
||||
|
|
Loading…
Reference in New Issue