Rework ActionsHandler
Rework ActionsHandler as static helper functions. The functions are now invoked from ChatBarCache so there is no need to pass an actions handler object around qml simplifying the code.
This commit is contained in:
@@ -27,14 +27,6 @@ QQC2.TextArea {
|
||||
required property ChatBarCache chatBarCache
|
||||
onChatBarCacheChanged: documentHandler.chatBarCache = chatBarCache
|
||||
|
||||
/**
|
||||
* @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 maximum width that the bubble's content can be.
|
||||
*/
|
||||
@@ -177,7 +169,7 @@ QQC2.TextArea {
|
||||
}
|
||||
|
||||
function post() {
|
||||
root.actionsHandler.handleMessageEvent(root.chatBarCache);
|
||||
root.chatBarCache.postMessage();
|
||||
root.clear();
|
||||
root.chatBarCache.clearRelations();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user