2019-10-20 13:39:47 +03:00
|
|
|
import QtQuick 2.6
|
2019-11-30 03:43:39 +03:00
|
|
|
import im.nheko 1.0
|
2019-10-20 13:39:47 +03:00
|
|
|
|
|
|
|
DelegateChooser {
|
2019-10-25 12:46:25 +03:00
|
|
|
//role: "type" //< not supported in our custom implementation, have to use roleValue
|
2019-10-20 13:39:47 +03:00
|
|
|
roleValue: model.type
|
|
|
|
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.TextMessage
|
2019-10-28 00:01:40 +03:00
|
|
|
TextMessage {}
|
2019-10-20 13:39:47 +03:00
|
|
|
}
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.NoticeMessage
|
2019-10-28 00:01:40 +03:00
|
|
|
NoticeMessage {}
|
2019-10-20 13:39:47 +03:00
|
|
|
}
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.EmoteMessage
|
2019-10-28 00:01:40 +03:00
|
|
|
TextMessage {}
|
2019-10-20 13:39:47 +03:00
|
|
|
}
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.ImageMessage
|
2019-10-28 00:01:40 +03:00
|
|
|
ImageMessage {}
|
2019-10-20 13:39:47 +03:00
|
|
|
}
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.Sticker
|
2019-10-28 00:01:40 +03:00
|
|
|
ImageMessage {}
|
2019-10-20 13:39:47 +03:00
|
|
|
}
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.FileMessage
|
2019-10-28 00:01:40 +03:00
|
|
|
FileMessage {}
|
2019-10-20 13:39:47 +03:00
|
|
|
}
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.VideoMessage
|
2019-10-28 00:01:40 +03:00
|
|
|
PlayableMediaMessage {}
|
2019-10-20 13:39:47 +03:00
|
|
|
}
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.AudioMessage
|
2019-10-28 00:01:40 +03:00
|
|
|
PlayableMediaMessage {}
|
2019-10-20 13:39:47 +03:00
|
|
|
}
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.Redacted
|
2019-11-22 19:08:32 +03:00
|
|
|
Pill {
|
|
|
|
text: qsTr("redacted")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
DelegateChoice {
|
|
|
|
roleValue: MtxEvent.Encryption
|
|
|
|
Pill {
|
|
|
|
text: qsTr("Encryption enabled")
|
|
|
|
}
|
2019-10-20 13:39:47 +03:00
|
|
|
}
|
2019-12-10 16:46:52 +03:00
|
|
|
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")
|
|
|
|
}
|
|
|
|
}
|
2019-10-20 13:39:47 +03:00
|
|
|
DelegateChoice {
|
2019-10-28 00:01:40 +03:00
|
|
|
Placeholder {}
|
2019-10-20 13:39:47 +03:00
|
|
|
}
|
|
|
|
}
|