Introduce the ActionsHandler

This commit is contained in:
Carl Schwan
2021-01-08 23:12:09 +00:00
parent 8e846f73d7
commit cd1bec9977
15 changed files with 473 additions and 108 deletions

View File

@@ -326,7 +326,6 @@ ToolBar {
room: currentRoom ?? null
}
property int lineHeight: contentHeight / lineCount
wrapMode: Text.Wrap
@@ -470,12 +469,8 @@ ToolBar {
}
function postMessage() {
// Qt wraps lines so we need to use a small hack
// to remove the wrapped lines but not break the empty
// lines.
const updatedText = inputField.text.trim()
.replace(/@([^: ]*):([^ ]*\.[^ ]*)/, "[@$1:$2](https://matrix.to/#/@$1:$2)");
documentHandler.postMessage(updatedText, attachmentPath, replyEventID, editEventId);
roomManager.actionsHandler.postMessage(inputField.text.trim(), attachmentPath,
replyEventID, editEventId);
clearAttachment();
currentRoom.markAllMessagesAsRead();
clear();