Fix room message.

This commit is contained in:
Black Hat 2018-07-09 14:16:32 +08:00
parent 0b2ae33f29
commit 3437b49677
1 changed files with 4 additions and 1 deletions

View File

@ -94,7 +94,7 @@ Item {
id: messageEventModel id: messageEventModel
room: currentRoom room: currentRoom
onModelReset: currentRoom.getPreviousContent(50) onRoomChanged: if (room.timelineSize === 0) room.getPreviousContent(50)
} }
delegate: Row { delegate: Row {
@ -138,10 +138,13 @@ Item {
anchors.fill: parent anchors.fill: parent
anchors.margins: 12 anchors.margins: 12
wrapMode: Label.Wrap wrapMode: Label.Wrap
textFormat: Text.RichText
} }
} }
} }
onAtYBeginningChanged: if (atYBeginning && currentRoom) currentRoom.getPreviousContent(50)
ScrollBar.vertical: ScrollBar { /*anchors.left: messageListView.right*/ } ScrollBar.vertical: ScrollBar { /*anchors.left: messageListView.right*/ }
Behavior on contentY { Behavior on contentY {