Thread View

So at the moment this remains behind the feature flag as this only adds a threadmodel and a basic visualisation. There is much more to come to get it ready for full release.
This commit is contained in:
James Graham
2024-08-18 15:19:03 +00:00
parent 149013d2ff
commit 56d790dda9
17 changed files with 347 additions and 23 deletions

View File

@@ -49,7 +49,7 @@ QQC2.Control {
/**
* @brief The model to visualise the content of the message.
*/
required property MessageContentModel contentModel
required property var contentModel
/**
* @brief The ActionsHandler object to use.

View File

@@ -87,8 +87,14 @@ TimelineDelegate {
*/
required property bool showReadMarkers
/**
* @brief Whether the message in a thread.
*/
required property bool isThreaded
/**
* @brief The Matrix ID of the root message in the thread, if any.
*/
required property string threadRoot
/**
@@ -282,7 +288,13 @@ TimelineDelegate {
author: root.author
contentModel: root.contentModel
// HACK: This is stupid but seemingly QConcatenateTablesProxyModel
// can't be passed as a model role, always returning null.
contentModel: if (root.isThreaded && NeoChatConfig.threads) {
return RoomManager.timelineModel.messageEventModel.threadModelForRootId(root.threadRoot);
} else {
return root.contentModel;
}
actionsHandler: root.ListView.view?.actionsHandler ?? null
timeline: root.ListView.view