Commit 72a4766c authored by Sylvain Berfini's avatar Sylvain Berfini

Simplified some properties

parent 3484ad6a
......@@ -33,35 +33,24 @@ Item {
id: icon
RowLayout {
Text {
property bool isNotDelivered: Utils.includes([
ChatModel.MessageStatusFileTransferError,
ChatModel.MessageStatusIdle,
ChatModel.MessageStatusInProgress,
ChatModel.MessageStatusNotDelivered
], $chatEntry.status)
property bool isNotDelivered: Utils.includes([
ChatModel.MessageStatusFileTransferError,
ChatModel.MessageStatusIdle,
ChatModel.MessageStatusInProgress,
ChatModel.MessageStatusNotDelivered
], $chatEntry.status)
property bool isRead: Utils.includes([
ChatModel.MessageStatusDisplayed
], $chatEntry.status)
property bool isRead: Utils.includes([
ChatModel.MessageStatusDisplayed
], $chatEntry.status)
Text {
text: isNotDelivered ? qsTr("Error") : isRead ? qsTr("Read") : qsTr("Delivered")
color: isNotDelivered ? Colors.error : isRead ? Colors.read : Colors.delivered
font.pointSize: ChatStyle.entry.message.outgoing.fontSize
}
Icon {
property bool isNotDelivered: Utils.includes([
ChatModel.MessageStatusFileTransferError,
ChatModel.MessageStatusIdle,
ChatModel.MessageStatusInProgress,
ChatModel.MessageStatusNotDelivered
], $chatEntry.status)
property bool isRead: Utils.includes([
ChatModel.MessageStatusDisplayed
], $chatEntry.status)
icon: isNotDelivered ? 'chat_error' : isRead ? 'chat_read' : 'chat_delivered'
iconSize: ChatStyle.entry.message.outgoing.sendIconSize
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment