ActionsHandler poperties

Make sure that all low level components get ActionsHandler through actual properties rather than magically
This commit is contained in:
James Graham
2023-10-22 13:39:34 +00:00
parent c2d82750b1
commit ef1d62d45c
6 changed files with 47 additions and 7 deletions

View File

@@ -50,6 +50,14 @@ QQC2.Control {
property NeoChatConnection connection
/**
* @brief The ActionsHandler object to use.
*
* This is expected to have the correct room set otherwise messages will be sent
* to the wrong room.
*/
required property ActionsHandler actionsHandler
/**
* @brief The list of actions in the ChatBar.
*
@@ -478,7 +486,7 @@ QQC2.Control {
}
function postMessage() {
actionsHandler.handleMessageEvent(_private.chatBarCache);
root.actionsHandler.handleMessageEvent(_private.chatBarCache);
repeatTimer.stop()
root.currentRoom.markAllMessagesAsRead();
textField.clear();