Prepare for reuseItems in timeline

The actual reuseItems is still blocked on a few upstream bugs.
This commit is contained in:
Nicolas Werner 2021-07-12 00:24:33 +02:00
parent f7ffcb4846
commit bd26624ed8
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
17 changed files with 481 additions and 144 deletions

View file

@ -21,15 +21,30 @@ Rectangle {
Reply {
id: replyPreview
property var modelData: room ? room.getDump(room.reply, room.id) : {
}
visible: room && room.reply
anchors.left: parent.left
anchors.leftMargin: 2 * 22 + 3 * 16
anchors.right: closeReplyButton.left
anchors.rightMargin: 2 * 22 + 3 * 16
anchors.bottom: parent.bottom
modelData: room ? room.getDump(room.reply, room.id) : {
}
userColor: TimelineManager.userColor(modelData.userId, Nheko.colors.window)
blurhash: modelData.blurhash ?? ""
body: modelData.body ?? ""
formattedBody: modelData.formattedBody ?? ""
eventId: modelData.eventId ?? ""
filename: modelData.filename ?? ""
filesize: modelData.filesize ?? ""
proportionalHeight: modelData.proportionalHeight ?? 1
type: modelData.type ?? MtxEvent.UnknownMessage
typeString: modelData.typeString ?? ""
url: modelData.url ?? ""
originalWidth: modelData.originalWidth ?? 0
isOnlyEmoji: modelData.isOnlyEmoji ?? false
userId: modelData.userId ?? ""
userName: modelData.userName ?? ""
}
ImageButton {