Implement basic placeholder and disable unimplemented event types

remotes/origin/0.7.0-dev
Nicolas Werner 5 years ago
parent d1fffd6617
commit 5200db17e9
  1. 24
      resources/qml/TimelineView.qml
  2. 10
      resources/qml/delegates/placeholder.qml
  3. 1
      resources/res.qrc

@ -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"
}

@ -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…
Cancel
Save