Separate ChatButtonHelper from ChatDocumentHandler

This commit is contained in:
James Graham
2025-12-29 16:24:24 +00:00
parent 45163944d0
commit 22d7d90cf4
19 changed files with 606 additions and 434 deletions

View File

@@ -16,6 +16,7 @@ QQC2.Popup {
id: root
required property MessageContent.ChatBarMessageContentModel chatContentModel
required property ChatButtonHelper chatButtonHelper
readonly property LibNeoChat.ChatDocumentHandler focusedDocumentHandler: chatContentModel.focusedDocumentHandler
y: -implicitHeight
@@ -47,7 +48,7 @@ QQC2.Popup {
) {
root.chatContentModel.insertStyleAtCursor(styleDelegate.index);
} else {
root.focusedDocumentHandler.setFormat(styleDelegate.index);
root.chatButtonHelper.setFormat(styleDelegate.index);
}
root.close();
}