aboutsummaryrefslogtreecommitdiff
path: root/qml/ComposePane.qml
diff options
context:
space:
mode:
authorMiquel Lionel <lionel@les-miquelots.net>2021-11-04 05:38:46 +0100
committerMiquel Lionel <lionel@les-miquelots.net>2021-11-04 05:38:46 +0100
commitb759e3578047b96968c9b9a817389d374850de59 (patch)
treee50ee76e23f72c6c850ec6ff3bdd67fd827e0586 /qml/ComposePane.qml
parenta414601fcab42c883c1c5e391b76e91a92446f91 (diff)
downloadkdeltachat-b759e3578047b96968c9b9a817389d374850de59.tar.gz
kdeltachat-b759e3578047b96968c9b9a817389d374850de59.zip
Implement sending Videochat invitations
- layers popping function was hard to read in main.qml, add a line - add editable videochat instance setting
Diffstat (limited to 'qml/ComposePane.qml')
-rw-r--r--qml/ComposePane.qml19
1 files changed, 14 insertions, 5 deletions
diff --git a/qml/ComposePane.qml b/qml/ComposePane.qml
index 976b4f1..1af4033 100644
--- a/qml/ComposePane.qml
+++ b/qml/ComposePane.qml
@@ -13,6 +13,7 @@ Pane {
property var attachFileUrl: ""
property bool canSend: root.chat && root.chat.canSend
property bool isContactRequest: root.chat && root.chat.isContactRequest
+ readonly property string vChatUrl: root.context.getConfig("webrtc_instance")
function createMessage() {
let DC_MSG_TEXT = 10;
@@ -100,24 +101,32 @@ Pane {
Button {
id: sendVChatUrl
+ enabled: vChatUrl.length > 0 ? true : false
hoverEnabled: true
ToolTip.visible: hovered
ToolTip.text: "Send videochat invitation"
text: "📞"
+ Layout.preferredWidth: attachButton.width / 2
+ Layout.alignment: Qt.AlignBottom
font.pixelSize: 20
+ onClicked: {
+ if(vChatUrl.length > 0)
+ root.context.sendVChatInv(chatId);
+ }
}
Button {
id: sendButton
- action: Action {
+ action: Kirigami.Action {
+ checked: false
shortcut: "Ctrl+S"
onTriggered:{
if (sendButton.enabled) {
root.focus = true;
- focus = true;
- down = true;
- clicked();
- down = false;
+ sendButton.focus = true;
+ sendButton.down = true;
+ sendButton.clicked();
+ sendButton.down = false;
}
}
}