summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2019-09-18 21:09:46 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2019-11-23 20:06:14 +0100
commit5200db17e9d2b816389b28f8587a03c6bf1b4059 (patch)
tree8bd0a079a9d05a8b1f267e02ff8d28a862102ac5 /resources
parentImplement simple scroll state handling (diff)
downloadnheko-5200db17e9d2b816389b28f8587a03c6bf1b4059.tar.xz
Implement basic placeholder and disable unimplemented event types
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/TimelineView.qml24
-rw-r--r--resources/qml/delegates/placeholder.qml10
-rw-r--r--resources/res.qrc1
3 files changed, 23 insertions, 12 deletions
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index e1aa2738..f82cf60a 100644
--- a/resources/qml/TimelineView.qml
+++ b/resources/qml/TimelineView.qml
@@ -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"
 				}
diff --git a/resources/qml/delegates/placeholder.qml b/resources/qml/delegates/placeholder.qml
new file mode 100644
index 00000000..d17184f3
--- /dev/null
+++ b/resources/qml/delegates/placeholder.qml
@@ -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
+}
diff --git a/resources/res.qrc b/resources/res.qrc
index 0d55e70d..6eb61e3d 100644
--- a/resources/res.qrc
+++ b/resources/res.qrc
@@ -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>