Fix broken read marker.

This commit is contained in:
Black Hat 2018-10-01 16:50:46 +08:00
parent 551e370410
commit 91fc03aba5
1 changed files with 5 additions and 1 deletions

View File

@ -137,7 +137,11 @@ Item {
currentRoom.getPreviousContent(50);
}
onMovementEnded: currentRoom.saveViewport(sortedMessageEventModel.mapToSource(indexAt(contentX, contentY)), sortedMessageEventModel.mapToSource(largestVisibleIndex))
onMovementEnded: {
currentRoom.saveViewport(sortedMessageEventModel.mapToSource(indexAt(contentX, contentY)), sortedMessageEventModel.mapToSource(largestVisibleIndex))
var newReadMarker = sortedMessageEventModel.get(largestVisibleIndex).eventId
if (newReadMarker) currentRoom.readMarkerEventId = newReadMarker
}
displaced: Transition {
NumberAnimation {