From c77a2535e5bfa3a6978a3988e2a65cd5f671d932 Mon Sep 17 00:00:00 2001 From: Black Hat Date: Mon, 15 Oct 2018 08:24:08 +0800 Subject: [PATCH] Fix broken infinite scroll. --- imports/Spectral/Panel/RoomPanel.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imports/Spectral/Panel/RoomPanel.qml b/imports/Spectral/Panel/RoomPanel.qml index f47e9d4..bcb58f4 100644 --- a/imports/Spectral/Panel/RoomPanel.qml +++ b/imports/Spectral/Panel/RoomPanel.qml @@ -21,7 +21,8 @@ RoomPanelForm { property int largestVisibleIndex: messageListView.count > 0 ? messageListView.indexAt(messageListView.contentX, messageListView.contentY + messageListView.height - 1) : -1 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); }