From 3437b496776ac535737c0694dd013edc63fae99d Mon Sep 17 00:00:00 2001 From: Black Hat Date: Mon, 9 Jul 2018 14:16:32 +0800 Subject: [PATCH] Fix room message. --- qml/form/RoomForm.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qml/form/RoomForm.qml b/qml/form/RoomForm.qml index d7f0f76..a658125 100644 --- a/qml/form/RoomForm.qml +++ b/qml/form/RoomForm.qml @@ -94,7 +94,7 @@ Item { id: messageEventModel room: currentRoom - onModelReset: currentRoom.getPreviousContent(50) + onRoomChanged: if (room.timelineSize === 0) room.getPreviousContent(50) } delegate: Row { @@ -138,10 +138,13 @@ Item { anchors.fill: parent anchors.margins: 12 wrapMode: Label.Wrap + textFormat: Text.RichText } } } + onAtYBeginningChanged: if (atYBeginning && currentRoom) currentRoom.getPreviousContent(50) + ScrollBar.vertical: ScrollBar { /*anchors.left: messageListView.right*/ } Behavior on contentY {