1 files changed, 22 insertions, 1 deletions
diff --git a/resources/qml/MessageInput.qml b/resources/qml/MessageInput.qml
index 2847d51d..ecacedba 100644
--- a/resources/qml/MessageInput.qml
+++ b/resources/qml/MessageInput.qml
@@ -3,6 +3,7 @@ import QtQuick.Controls 2.3
import QtQuick.Layouts 1.2
import QtQuick.Window 2.2
import im.nheko 1.0
+import "./voip"
Rectangle {
color: colors.window
@@ -10,6 +11,13 @@ Rectangle {
Layout.preferredHeight: textInput.height
Layout.minimumHeight: 40
+ Component {
+ id: placeCallDialog
+
+ PlaceCall {
+ }
+ }
+
RowLayout {
id: inputBar
@@ -28,7 +36,20 @@ Rectangle {
Layout.topMargin: 8
Layout.bottomMargin: 8
Layout.leftMargin: 16
- onClicked: TimelineManager.timeline.input.callButton()
+ onClicked: {
+ if (TimelineManager.timeline) {
+ if (CallManager.haveCallInvite) {
+ return;
+ }
+ else if (CallManager.isOnCall) {
+ CallManager.hangUp();
+ }
+ else {
+ var dialog = placeCallDialog.createObject(timelineRoot);
+ dialog.show();
+ }
+ }
+ }
}
ImageButton {
|