|
|
@ -71,27 +71,39 @@ Item { |
|
|
|
gesturePolicy: TapHandler.ReleaseWithinBounds |
|
|
|
gesturePolicy: TapHandler.ReleaseWithinBounds |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
RowLayout { |
|
|
|
Item { |
|
|
|
id: row |
|
|
|
id: row |
|
|
|
|
|
|
|
|
|
|
|
anchors.rightMargin: 1 |
|
|
|
anchors.rightMargin: 1 |
|
|
|
anchors.leftMargin: Nheko.avatarSize + 16 |
|
|
|
anchors.leftMargin: Nheko.avatarSize + 16 |
|
|
|
anchors.left: parent.left |
|
|
|
anchors.left: parent.left |
|
|
|
anchors.right: parent.right |
|
|
|
anchors.right: parent.right |
|
|
|
|
|
|
|
height: msg.height+reactionRow.height+2 |
|
|
|
Column { |
|
|
|
GridLayout { |
|
|
|
Layout.fillWidth: true |
|
|
|
id: msg |
|
|
|
Layout.alignment: Qt.AlignTop |
|
|
|
anchors { |
|
|
|
spacing: 4 |
|
|
|
right: parent.right |
|
|
|
Layout.topMargin: 1 |
|
|
|
left: parent.left |
|
|
|
Layout.bottomMargin: 1 |
|
|
|
top: parent.top |
|
|
|
|
|
|
|
topMargin: 1 |
|
|
|
|
|
|
|
bottomMargin: 1 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
rowSpacing: 0 |
|
|
|
|
|
|
|
columnSpacing: 0 |
|
|
|
|
|
|
|
columns: 2 |
|
|
|
|
|
|
|
rows: 2 |
|
|
|
|
|
|
|
|
|
|
|
// fancy reply, if this is a reply |
|
|
|
// fancy reply, if this is a reply |
|
|
|
Reply { |
|
|
|
Reply { |
|
|
|
|
|
|
|
Layout.row: 0 |
|
|
|
|
|
|
|
Layout.column: 0 |
|
|
|
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
|
|
Layout.margins: 0 |
|
|
|
|
|
|
|
id: reply |
|
|
|
|
|
|
|
|
|
|
|
function fromModel(role) { |
|
|
|
function fromModel(role) { |
|
|
|
return replyTo != "" ? room.dataById(replyTo, role, r.eventId) : null; |
|
|
|
return replyTo != "" ? room.dataById(replyTo, role, r.eventId) : null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
visible: replyTo |
|
|
|
visible: replyTo |
|
|
|
userColor: r.relatedEventCacheBuster, TimelineManager.userColor(userId, Nheko.colors.base) |
|
|
|
userColor: r.relatedEventCacheBuster, TimelineManager.userColor(userId, Nheko.colors.base) |
|
|
|
blurhash: r.relatedEventCacheBuster, fromModel(Room.Blurhash) ?? "" |
|
|
|
blurhash: r.relatedEventCacheBuster, fromModel(Room.Blurhash) ?? "" |
|
|
@ -118,9 +130,12 @@ Item { |
|
|
|
|
|
|
|
|
|
|
|
// actual message content |
|
|
|
// actual message content |
|
|
|
MessageDelegate { |
|
|
|
MessageDelegate { |
|
|
|
|
|
|
|
Layout.row: 1 |
|
|
|
|
|
|
|
Layout.column: 0 |
|
|
|
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
|
|
Layout.margins: 2 |
|
|
|
id: contentItem |
|
|
|
id: contentItem |
|
|
|
|
|
|
|
|
|
|
|
width: parent.width |
|
|
|
|
|
|
|
blurhash: r.blurhash |
|
|
|
blurhash: r.blurhash |
|
|
|
body: r.body |
|
|
|
body: r.body |
|
|
|
formattedBody: r.formattedBody |
|
|
|
formattedBody: r.formattedBody |
|
|
@ -144,14 +159,11 @@ Item { |
|
|
|
isReply: false |
|
|
|
isReply: false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Reactions { |
|
|
|
RowLayout { |
|
|
|
id: reactionRow |
|
|
|
Layout.column: 1 |
|
|
|
|
|
|
|
Layout.row: 0 |
|
|
|
reactions: r.reactions |
|
|
|
Layout.rowSpan: 2 |
|
|
|
eventId: r.eventId |
|
|
|
Layout.alignment: Qt.AlignTop | Qt.AlignRight |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
StatusIndicator { |
|
|
|
StatusIndicator { |
|
|
|
Layout.alignment: Qt.AlignRight | Qt.AlignTop |
|
|
|
Layout.alignment: Qt.AlignRight | Qt.AlignTop |
|
|
@ -204,7 +216,19 @@ Item { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reactions { |
|
|
|
|
|
|
|
anchors { |
|
|
|
|
|
|
|
top: msg.bottom |
|
|
|
|
|
|
|
left: parent.left |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
id: reactionRow |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
reactions: r.reactions |
|
|
|
|
|
|
|
eventId: r.eventId |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|