Add support for stickers

Fix #130
This commit is contained in:
Carl Schwan
2020-12-29 14:28:32 +00:00
parent 9ba0a755e4
commit 5c8d916752
4 changed files with 57 additions and 31 deletions

View File

@@ -318,7 +318,7 @@ Kirigami.ScrollablePage {
ReactionDelegate {
Layout.fillWidth: true
Layout.topMargin: 0
Layout.bottomMargin: Kirigami.Units.largeSpacing * 2
Layout.bottomMargin: Kirigami.Units.largeSpacing
}
]
}
@@ -362,7 +362,35 @@ Kirigami.ScrollablePage {
Layout.fillWidth: true
Layout.topMargin: 0
Layout.maximumHeight: 320
Layout.bottomMargin: 8
Layout.bottomMargin: Kirigami.Units.largeSpacing
}
]
}
}
}
DelegateChoice {
roleValue: "sticker"
delegate: TimelineContainer {
width: messageListView.width
innerObject: MessageDelegate {
Layout.fillWidth: true
onReplyClicked: goToEvent(eventID)
onReplyToMessageClicked: replyToMessage(replyUser, replyContent, eventId);
innerObject: [
ImageDelegate {
readonly: true
Layout.maximumWidth: parent.width / 2
Layout.minimumWidth: 320
Layout.preferredHeight: info.h / info.w * width
},
ReactionDelegate {
Layout.fillWidth: true
Layout.topMargin: 0
Layout.maximumHeight: 320
Layout.bottomMargin: Kirigami.Units.largeSpacing
}
]
}
@@ -443,6 +471,7 @@ Kirigami.ScrollablePage {
}
}
DelegateChoice {
roleValue: "other"
delegate: Item {}