Fix broken infinite scroll.

This commit is contained in:
Black Hat 2018-10-15 08:24:08 +08:00
parent c8184929e4
commit c77a2535e5
1 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,8 @@ RoomPanelForm {
property int largestVisibleIndex: messageListView.count > 0 ? messageListView.indexAt(messageListView.contentX, messageListView.contentY + messageListView.height - 1) : -1 property int largestVisibleIndex: messageListView.count > 0 ? messageListView.indexAt(messageListView.contentX, messageListView.contentY + messageListView.height - 1) : -1
onContentYChanged: { onContentYChanged: {
if(messageListView.verticalVelocity < 0 && messageListView.contentY - 5000 < messageListView.originY) console.log("Content Y changed.")
if(currentRoom && messageListView.contentY - 5000 < messageListView.originY)
currentRoom.getPreviousContent(50); currentRoom.getPreviousContent(50);
} }