Disable animation.

This commit is contained in:
Black Hat 2019-05-06 21:32:16 +08:00
parent 676cf35c3f
commit 651c3d238b
1 changed files with 1 additions and 24 deletions

View File

@ -303,28 +303,6 @@ Item {
onClicked: messageListView.positionViewAtBeginning() 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 { Control {
@ -372,8 +350,7 @@ Item {
var index = messageEventModel.eventIDToIndex(eventID) var index = messageEventModel.eventIDToIndex(eventID)
if (index === -1) return if (index === -1) return
// messageListView.currentIndex = sortedMessageEventModel.mapFromSource(index) // messageListView.currentIndex = sortedMessageEventModel.mapFromSource(index)
// messageListView.positionViewAtIndex(sortedMessageEventModel.mapFromSource(index), ListView.Contain) messageListView.positionViewAtIndex(sortedMessageEventModel.mapFromSource(index), ListView.Contain)
messageListView.gotoIndex(sortedMessageEventModel.mapFromSource(index))
} }
function saveReadMarker(room) { function saveReadMarker(room) {