matrixion/resources/qml/delegates/MessageDelegate.qml

51 lines
933 B
QML
Raw Normal View History

import QtQuick 2.6
import Qt.labs.qmlmodels 1.0
import com.github.nheko 1.0
DelegateChooser {
//role: "type" //< not supported in our custom implementation, have to use roleValue
roleValue: model.type
2019-10-28 00:01:40 +03:00
width: parent.width
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
2019-10-28 00:01:40 +03:00
Redacted {}
}
DelegateChoice {
2019-10-28 00:01:40 +03:00
Placeholder {}
}
}