Implement voice & video calls
This commit is contained in:
22
src/qml/Component/Timeline/CallInviteDelegate.qml
Normal file
22
src/qml/Component/Timeline/CallInviteDelegate.qml
Normal file
@@ -0,0 +1,22 @@
|
||||
// SPDX-FileCopyrightText: 2022 Carson Black <uhhadd@gmail.com>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15 as QQC2
|
||||
import QtQuick.Layouts 1.15
|
||||
|
||||
import org.kde.kirigami 2.15 as Kirigami
|
||||
import org.kde.neochat 1.0
|
||||
|
||||
TimelineContainer {
|
||||
width: ListView.view.width
|
||||
|
||||
innerObject: QQC2.Control {
|
||||
Layout.leftMargin: Config.showAvatarInTimeline ? Kirigami.Units.largeSpacing : 0
|
||||
padding: Kirigami.Units.gridUnit*2
|
||||
|
||||
contentItem: QQC2.Label {
|
||||
text: model.author.isLocalUser ? i18n("Outgoing Call") : i18n("Incoming Call")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,11 @@ DelegateChooser {
|
||||
delegate: StateDelegate {}
|
||||
}
|
||||
|
||||
DelegateChoice {
|
||||
roleValue: MessageEventModel.CallInvite
|
||||
delegate: CallInviteDelegate {}
|
||||
}
|
||||
|
||||
DelegateChoice {
|
||||
roleValue: MessageEventModel.Emote
|
||||
delegate: MessageDelegate {}
|
||||
|
||||
Reference in New Issue
Block a user