Use a basic implementation of a DelegateChooser for compat with older Qt
The interface is taken from Qt/KDE, but the implementation is different,
because the Qt implementation depends on some Qt internals.
1 files changed, 1 insertions, 45 deletions
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index d1ada3ea..e09b9ed3 100644
--- a/resources/qml/TimelineView.qml
+++ b/resources/qml/TimelineView.qml
@@ -3,7 +3,6 @@ import QtQuick.Controls 2.1
import QtQuick.Layouts 1.2
import QtGraphicalEffects 1.0
import QtQuick.Window 2.2
-import Qt.labs.qmlmodels 1.0
import com.github.nheko 1.0
@@ -91,50 +90,7 @@ Rectangle {
onMovementEnded: updatePosition()
spacing: 4
- delegate: DelegateChooser {
- role: "type"
- DelegateChoice {
- roleValue: MtxEvent.TextMessage
- TimelineRow { view: chat; TextMessage { id: kid } }
- }
- DelegateChoice {
- roleValue: MtxEvent.NoticeMessage
- TimelineRow { view: chat; NoticeMessage { id: kid } }
- }
- DelegateChoice {
- roleValue: MtxEvent.EmoteMessage
- TimelineRow { view: chat; TextMessage { id: kid } }
- }
- DelegateChoice {
- roleValue: MtxEvent.ImageMessage
- TimelineRow { view: chat; ImageMessage { id: kid } }
- }
- DelegateChoice {
- roleValue: MtxEvent.Sticker
- TimelineRow { view: chat; ImageMessage { id: kid } }
- }
- DelegateChoice {
- roleValue: MtxEvent.FileMessage
- TimelineRow { view: chat; FileMessage { id: kid } }
- }
- DelegateChoice {
- roleValue: MtxEvent.VideoMessage
- TimelineRow { view: chat; PlayableMediaMessage { id: kid } }
- }
- DelegateChoice {
- roleValue: MtxEvent.AudioMessage
- TimelineRow { view: chat; PlayableMediaMessage { id: kid } }
- }
- DelegateChoice {
- roleValue: MtxEvent.Redacted
- TimelineRow { view: chat; Redacted { id: kid } }
- }
- DelegateChoice {
- //roleValue: MtxEvent.Redacted
- TimelineRow { view: chat; Placeholder { id: kid } }
- }
- }
-
+ delegate: RowDelegateChooser {}
section {
property: "section"
|