matrixion/resources/qml/delegates/MessageDelegate.qml

68 lines
1.3 KiB
QML
Raw Normal View History

import QtQuick 2.6
import im.nheko 1.0
DelegateChooser {
//role: "type" //< not supported in our custom implementation, have to use roleValue
roleValue: model.type
DelegateChoice {
roleValue: MtxEvent.TextMessage
2019-10-28 00:01:40 +03:00
TextMessage {}
}
DelegateChoice {
roleValue: MtxEvent.NoticeMessage
2019-10-28 00:01:40 +03:00
NoticeMessage {}
}
DelegateChoice {
roleValue: MtxEvent.EmoteMessage
2019-10-28 00:01:40 +03:00
TextMessage {}
}
DelegateChoice {
roleValue: MtxEvent.ImageMessage
2019-10-28 00:01:40 +03:00
ImageMessage {}
}
DelegateChoice {
roleValue: MtxEvent.Sticker
2019-10-28 00:01:40 +03:00
ImageMessage {}
}
DelegateChoice {
roleValue: MtxEvent.FileMessage
2019-10-28 00:01:40 +03:00
FileMessage {}
}
DelegateChoice {
roleValue: MtxEvent.VideoMessage
2019-10-28 00:01:40 +03:00
PlayableMediaMessage {}
}
DelegateChoice {
roleValue: MtxEvent.AudioMessage
2019-10-28 00:01:40 +03:00
PlayableMediaMessage {}
}
DelegateChoice {
roleValue: MtxEvent.Redacted
Pill {
text: qsTr("redacted")
}
}
DelegateChoice {
roleValue: MtxEvent.Encryption
Pill {
text: qsTr("Encryption enabled")
}
}
DelegateChoice {
roleValue: MtxEvent.Name
NoticeMessage {
notice: model.roomName ? qsTr("room name changed to: %1").arg(model.roomName) : qsTr("removed room name")
}
}
DelegateChoice {
roleValue: MtxEvent.Topic
NoticeMessage {
notice: model.roomTopic ? qsTr("topic changed to: %1").arg(model.roomTopic) : qsTr("removed topic")
}
}
DelegateChoice {
2019-10-28 00:01:40 +03:00
Placeholder {}
}
}