aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlink2xt <link2xt@testrun.org>2021-08-07 21:36:46 +0000
committerlink2xt <link2xt@testrun.org>2021-08-07 21:36:46 +0000
commit541cfbdad5596e55b686abd02a93638f0a7f75f6 (patch)
tree5b6184a7813c02b9256ba5aeddd5d36d03480865
parent857b1a43112135a14a12b1c12e564f13451579f4 (diff)
downloadkdeltachat-541cfbdad5596e55b686abd02a93638f0a7f75f6.tar.gz
kdeltachat-541cfbdad5596e55b686abd02a93638f0a7f75f6.zip
ComposePane: set `id` to `root`
-rw-r--r--qml/ComposePane.qml12
1 files changed, 7 insertions, 5 deletions
diff --git a/qml/ComposePane.qml b/qml/ComposePane.qml
index 0ca189d..5ba77f5 100644
--- a/qml/ComposePane.qml
+++ b/qml/ComposePane.qml
@@ -5,6 +5,8 @@ import QtQuick.Layouts 1.12
import DeltaChat 1.0
Pane {
+ id: root
+
required property DcContext context
required property var chatId
@@ -22,7 +24,7 @@ Pane {
selectByMouse: true
Component.onCompleted: {
- let draft = context.getDraft(chatId)
+ let draft = root.context.getDraft(chatId)
if (draft) {
messageField.text = draft.text
}
@@ -30,9 +32,9 @@ Pane {
Connections {
function onEditingFinished() {
- var msg = context.newMessage(10)
+ var msg = root.context.newMessage(10)
msg.setText(messageField.text)
- context.setDraft(chatId, msg)
+ root.context.setDraft(chatId, msg)
}
}
}
@@ -46,9 +48,9 @@ Pane {
text: qsTr("Send")
enabled: messageField.length > 0
onClicked: {
- chatPage.context.sendTextMessage(chatId, messageField.text)
+ root.context.sendTextMessage(chatId, messageField.text)
messageField.text = ""
- context.setDraft(chatId, null)
+ root.context.setDraft(chatId, null)
}
}
}