feat: Add message navigator

This commit is contained in:
Petr Mironychev
2026-05-27 22:06:41 +02:00
parent dc016ce533
commit fcc651fd75
5 changed files with 138 additions and 1 deletions

View File

@@ -175,6 +175,27 @@ ChatRootView {
}
}
RowLayout {
Layout.fillWidth: true
Layout.fillHeight: true
spacing: 2
MessageNavigator {
id: messageNavigator
Layout.preferredWidth: 16
Layout.fillHeight: true
Layout.topMargin: 4
Layout.bottomMargin: 4
chatModel: root.chatModel
onMessageClicked: function(messageIndex) {
chatListView.userScrolledUp = true
chatListView.positionViewAtIndex(messageIndex, ListView.Beginning)
}
}
ListView {
id: chatListView
@@ -182,7 +203,7 @@ ChatRootView {
Layout.fillWidth: true
Layout.fillHeight: true
leftMargin: 5
leftMargin: 3
model: root.chatModel
clip: true
spacing: 0
@@ -370,6 +391,7 @@ ChatRootView {
}
}
}
}
ScrollView {
id: view