mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-02 01:38:00 +00:00
add default list to the chat messages
This commit is contained in:
parent
2f428ef41d
commit
0ee32c2bb1
@ -33,7 +33,9 @@ StackLayout {
|
|||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||||
|
|
||||||
ChatMessages {}
|
ChatMessages {
|
||||||
|
messageList: chatsModel.messageList
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
@ -5,10 +5,12 @@ import QtQuick.Layouts 1.3
|
|||||||
import Qt.labs.platform 1.1
|
import Qt.labs.platform 1.1
|
||||||
import "../../../../shared"
|
import "../../../../shared"
|
||||||
import "../../../../imports"
|
import "../../../../imports"
|
||||||
|
import "./samples/"
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
|
property var messageList: MessagesData {}
|
||||||
id: chatLogView
|
id: chatLogView
|
||||||
model: chatsModel.messageList
|
model: messageList
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
delegate: Message {
|
delegate: Message {
|
||||||
|
40
ui/app/AppLayouts/Chat/ChatColumn/samples/MessagesData.qml
Normal file
40
ui/app/AppLayouts/Chat/ChatColumn/samples/MessagesData.qml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
import QtQuick 2.3
|
||||||
|
import QtQuick.Controls 2.3
|
||||||
|
import QtQuick.Controls 2.12 as QQC2
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import Qt.labs.platform 1.1
|
||||||
|
|
||||||
|
ListModel {
|
||||||
|
ListElement {
|
||||||
|
userName: "Ferocious Herringbone Sinewave"
|
||||||
|
message: "Everybody betrayed me! \n I'm fed up with this world."
|
||||||
|
repeatMessageInfo: true
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
userName: "Teenage Mutant Turtle"
|
||||||
|
message: "You're tearing me apart, Lisa!"
|
||||||
|
repeatMessageInfo: true
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
userName: "Teenage Mutant Turtle"
|
||||||
|
message: "It's bullshit, I did not hit her.\nI did nooot."
|
||||||
|
repeatMessageInfo: false
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
userName: "Teenage Mutant Turtle"
|
||||||
|
message: "Oh hi, Mark!"
|
||||||
|
repeatMessageInfo: false
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
userName: "me"
|
||||||
|
message: "Hi Johnny"
|
||||||
|
isCurrentUser: true
|
||||||
|
repeatMessageInfo: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*##^##
|
||||||
|
Designer {
|
||||||
|
D{i:0;autoSize:true;height:480;width:640}
|
||||||
|
}
|
||||||
|
##^##*/
|
1
ui/app/AppLayouts/Chat/ChatColumn/samples/qmldir
Normal file
1
ui/app/AppLayouts/Chat/ChatColumn/samples/qmldir
Normal file
@ -0,0 +1 @@
|
|||||||
|
MessagesData 1.0 MessagesData.qml
|
@ -52,6 +52,7 @@ DISTFILES += \
|
|||||||
Theme.qml \
|
Theme.qml \
|
||||||
app/AppLayouts/Browser/BrowserLayout.qml \
|
app/AppLayouts/Browser/BrowserLayout.qml \
|
||||||
app/AppLayouts/Chat/ChatColumn.qml \
|
app/AppLayouts/Chat/ChatColumn.qml \
|
||||||
|
app/AppLayouts/Chat/ChatColumn/MessagesData.qml \
|
||||||
app/AppLayouts/Chat/ChatLayout.qml \
|
app/AppLayouts/Chat/ChatLayout.qml \
|
||||||
app/AppLayouts/Chat/ContactsColumn.qml \
|
app/AppLayouts/Chat/ContactsColumn.qml \
|
||||||
app/AppLayouts/Chat/components/PublicChatPopup.qml \
|
app/AppLayouts/Chat/components/PublicChatPopup.qml \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user