matrixion/resources/qml/dialogs/LeaveRoomDialog.qml
Rohit Sutradhar ac48c33286
VoIP v1 implementation (#1161)
* Initial commit for VoIP v1 implementation

* Added draft of event handlers for voip methods

* Added event handlers for VoIP events, added rejectCall, added version tracking for call version for V0 and V1 compatibility

* Added call events to the general message pipeline. Modified Call Reject mechanism

* Added message delegates for new events. Modified hidden events. Updated handle events.

* Updated implementation to keep track of calls on other devices

* Fixed linting

* Fixed code warnings

* Fixed minor bugs

* fixed ci

* Added acceptNegotiation method definition when missing gstreamer

* Fixed warnings

* Fixed linting
2022-10-14 13:49:05 +00:00

32 lines
792 B
QML

// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
import Qt.labs.platform 1.1 as P
import QtQuick 2.15
import QtQuick.Controls 2.15
import im.nheko 1.0
import "../voip"
P.MessageDialog {
id: leaveRoomRoot
required property string roomId
property string reason: ""
title: qsTr("Leave room")
text: qsTr("Are you sure you want to leave?")
modality: Qt.ApplicationModal
buttons: P.MessageDialog.Ok | P.MessageDialog.Cancel
onAccepted: {
if (CallManager.haveCallInvite) {
callManager.rejectInvite();
} else if (CallManager.isOnCall) {
CallManager.hangUp();
}
Rooms.leave(roomId, reason)
}
}