From 651c3d238bef97b5eeb68f00edf7f7b5c2310ef1 Mon Sep 17 00:00:00 2001 From: Black Hat Date: Mon, 6 May 2019 21:32:16 +0800 Subject: [PATCH] Disable animation. --- imports/Spectral/Panel/RoomPanel.qml | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/imports/Spectral/Panel/RoomPanel.qml b/imports/Spectral/Panel/RoomPanel.qml index 26eb049..0176e5c 100644 --- a/imports/Spectral/Panel/RoomPanel.qml +++ b/imports/Spectral/Panel/RoomPanel.qml @@ -303,28 +303,6 @@ Item { onClicked: messageListView.positionViewAtBeginning() } - - NumberAnimation { - id: timelineAnimation - target: messageListView - property: "contentY" - easing.type: Easing.InOutQuad - duration: 500 - } - - function gotoIndex(idx) { - timelineAnimation.stop() - - var pos = contentY - var destPos - - positionViewAtIndex(idx, ListView.Contain) - destPos = contentY - - timelineAnimation.from = pos - timelineAnimation.to = destPos - timelineAnimation.start() - } } Control { @@ -372,8 +350,7 @@ Item { var index = messageEventModel.eventIDToIndex(eventID) if (index === -1) return // messageListView.currentIndex = sortedMessageEventModel.mapFromSource(index) - // messageListView.positionViewAtIndex(sortedMessageEventModel.mapFromSource(index), ListView.Contain) - messageListView.gotoIndex(sortedMessageEventModel.mapFromSource(index)) + messageListView.positionViewAtIndex(sortedMessageEventModel.mapFromSource(index), ListView.Contain) } function saveReadMarker(room) {