mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +03:00
Implement basic placeholder and disable unimplemented event types
This commit is contained in:
parent
d1fffd6617
commit
5200db17e9
3 changed files with 23 additions and 12 deletions
|
@ -95,21 +95,21 @@ Rectangle {
|
|||
height: item.height
|
||||
|
||||
source: switch(model.type) {
|
||||
case MtxEvent.Aliases: return "delegates/Aliases.qml"
|
||||
case MtxEvent.Avatar: return "delegates/Avatar.qml"
|
||||
case MtxEvent.CanonicalAlias: return "delegates/CanonicalAlias.qml"
|
||||
case MtxEvent.Create: return "delegates/Create.qml"
|
||||
case MtxEvent.GuestAccess: return "delegates/GuestAccess.qml"
|
||||
case MtxEvent.HistoryVisibility: return "delegates/HistoryVisibility.qml"
|
||||
case MtxEvent.JoinRules: return "delegates/JoinRules.qml"
|
||||
case MtxEvent.Member: return "delegates/Member.qml"
|
||||
case MtxEvent.Name: return "delegates/Name.qml"
|
||||
case MtxEvent.PowerLevels: return "delegates/PowerLevels.qml"
|
||||
case MtxEvent.Topic: return "delegates/Topic.qml"
|
||||
//case MtxEvent.Aliases: return "delegates/Aliases.qml"
|
||||
//case MtxEvent.Avatar: return "delegates/Avatar.qml"
|
||||
//case MtxEvent.CanonicalAlias: return "delegates/CanonicalAlias.qml"
|
||||
//case MtxEvent.Create: return "delegates/Create.qml"
|
||||
//case MtxEvent.GuestAccess: return "delegates/GuestAccess.qml"
|
||||
//case MtxEvent.HistoryVisibility: return "delegates/HistoryVisibility.qml"
|
||||
//case MtxEvent.JoinRules: return "delegates/JoinRules.qml"
|
||||
//case MtxEvent.Member: return "delegates/Member.qml"
|
||||
//case MtxEvent.Name: return "delegates/Name.qml"
|
||||
//case MtxEvent.PowerLevels: return "delegates/PowerLevels.qml"
|
||||
//case MtxEvent.Topic: return "delegates/Topic.qml"
|
||||
case MtxEvent.NoticeMessage: return "delegates/NoticeMessage.qml"
|
||||
case MtxEvent.TextMessage: return "delegates/TextMessage.qml"
|
||||
case MtxEvent.ImageMessage: return "delegates/ImageMessage.qml"
|
||||
case MtxEvent.VideoMessage: return "delegates/VideoMessage.qml"
|
||||
//case MtxEvent.VideoMessage: return "delegates/VideoMessage.qml"
|
||||
case MtxEvent.Redacted: return "delegates/Redacted.qml"
|
||||
default: return "delegates/placeholder.qml"
|
||||
}
|
||||
|
|
10
resources/qml/delegates/placeholder.qml
Normal file
10
resources/qml/delegates/placeholder.qml
Normal file
|
@ -0,0 +1,10 @@
|
|||
import QtQuick 2.5
|
||||
import QtQuick.Controls 2.5
|
||||
|
||||
Label {
|
||||
text: qsTr("unimplemented event: ") + eventData.type
|
||||
textFormat: Text.PlainText
|
||||
wrapMode: Text.Wrap
|
||||
width: parent.width
|
||||
color: inactiveColors.text
|
||||
}
|
|
@ -121,5 +121,6 @@
|
|||
<file>qml/delegates/NoticeMessage.qml</file>
|
||||
<file>qml/delegates/ImageMessage.qml</file>
|
||||
<file>qml/delegates/Redacted.qml</file>
|
||||
<file>qml/delegates/placeholder.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
Loading…
Reference in a new issue