diff options
Diffstat (limited to 'qml/ChatPage.qml')
-rw-r--r-- | qml/ChatPage.qml | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/qml/ChatPage.qml b/qml/ChatPage.qml index 4a4ab2a..431c92f 100644 --- a/qml/ChatPage.qml +++ b/qml/ChatPage.qml @@ -83,40 +83,6 @@ Kirigami.ScrollablePage { anchors.fill: parent } - Component { - id: composePane - - Pane { - Layout.fillWidth: true - padding: 0 - - RowLayout { - width: parent.width - - TextArea { - id: messageField - - Layout.fillWidth: true - placeholderText: qsTr("Message") - wrapMode: TextArea.Wrap - selectByMouse: true - } - - Button { - id: sendButton - - icon.name: "document-send" - text: qsTr("Send") - enabled: messageField.length > 0 - onClicked: { - chatPage.context.sendTextMessage(chatPage.chatId, messageField.text) - messageField.text = "" - } - } - } - } - } - ListView { id: messageListView @@ -142,9 +108,10 @@ Kirigami.ScrollablePage { } } - footer: Loader { - sourceComponent: composePane - Layout.fillWidth: true + footer: ComposePane { + context: chatPage.context + chatId: chatPage.chatId + visible: chatPage.chat && chatPage.chat.canSend } } |