From 0c1a90bf5df62c833d49151ef2c19fd81ff2c306 Mon Sep 17 00:00:00 2001 From: Black Hat Date: Sat, 13 Oct 2018 15:31:31 +0800 Subject: [PATCH] Fix an issue caused by viewpoint restoring. --- imports/Spectral/Panel/RoomPanel.qml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/imports/Spectral/Panel/RoomPanel.qml b/imports/Spectral/Panel/RoomPanel.qml index 53806ee..f47e9d4 100644 --- a/imports/Spectral/Panel/RoomPanel.qml +++ b/imports/Spectral/Panel/RoomPanel.qml @@ -9,13 +9,8 @@ RoomPanelForm { if (currentRoom) { var lastScrollPosition = sortedMessageEventModel.mapFromSource(currentRoom.savedTopVisibleIndex()) - if (lastScrollPosition === 0) - messageListView.positionViewAtEnd() - else - { - console.log("Scrolling to position", lastScrollPosition) - messageListView.currentIndex = lastScrollPosition - } + console.log("Scrolling to position", lastScrollPosition) + messageListView.currentIndex = lastScrollPosition if (messageListView.contentY < messageListView.originY + 10 || currentRoom.timelineSize === 0) currentRoom.getPreviousContent(100) }