Init scroll to eventid.

This commit is contained in:
Black Hat
2018-10-22 09:48:37 +08:00
parent ffbfa977b5
commit fce213a432
6 changed files with 25 additions and 5 deletions

View File

@@ -40,4 +40,10 @@ RoomPanelForm {
}
goTopFab.onClicked: messageListView.positionViewAtBeginning()
function goToEvent(eventID) {
var index = messageEventModel.eventIDToIndex(eventID)
if (index === -1) return
messageListView.currentIndex = sortedMessageEventModel.mapFromSource(index)
}
}