Display reactions in MessageDelegate.

This commit is contained in:
Black Hat
2019-07-21 16:11:26 +08:00
parent 992cbaca87
commit 761943f98f
6 changed files with 73 additions and 4 deletions

View File

@@ -0,0 +1,28 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import Spectral.Setting 0.1
RowLayout {
visible: reaction || false
Repeater {
model: reaction
delegate: Control {
horizontalPadding: 4
verticalPadding: 0
background: Rectangle {
radius: height / 2
color: MPalette.banner
}
contentItem: Label {
text: modelData.reaction + " " + modelData.count
font.pixelSize: 10
}
}
}
}