Commit 21e74f27 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(chat): display correctly busy indicator when a message is sent

parent bfef4187
......@@ -137,7 +137,7 @@ Rectangle {
ChatStyle.entry.message.extraContent.spacing +
ChatStyle.entry.message.extraContent.rightMargin +
ChatStyle.entry.message.extraContent.leftMargin +
ChatStyle.entry.message.outgoing.sendIconSize
ChatStyle.entry.message.outgoing.areaSize
}
color: ChatStyle.color
......
......@@ -284,6 +284,8 @@ Row {
id: icon
Icon {
anchors.centerIn: parent
icon: rectangle.isNotDelivered
? 'chat_error'
: (rectangle.isRead ? 'chat_read' : 'chat_delivered')
......@@ -299,12 +301,22 @@ Row {
Component {
id: indicator
BusyIndicator {}
Item {
anchors.fill: parent
BusyIndicator {
anchors.centerIn: parent
height: ChatStyle.entry.message.outgoing.busyIndicatorSize
width: ChatStyle.entry.message.outgoing.busyIndicatorSize
}
}
}
Loader {
height: ChatStyle.entry.lineHeight
width: ChatStyle.entry.message.outgoing.sendIconSize
width: ChatStyle.entry.message.outgoing.areaSize
sourceComponent: $chatEntry.isOutgoing
? (
......
......@@ -62,12 +62,22 @@ Item {
Component {
id: indicator
BusyIndicator {}
Item {
anchors.fill: parent
BusyIndicator {
anchors.centerIn: parent
height: ChatStyle.entry.message.outgoing.busyIndicatorSize
width: ChatStyle.entry.message.outgoing.busyIndicatorSize
}
}
}
Loader {
height: ChatStyle.entry.lineHeight
width: ChatStyle.entry.message.outgoing.sendIconSize
width: ChatStyle.entry.message.outgoing.areaSize
sourceComponent: $chatEntry.status === ChatModel.MessageStatusInProgress
? indicator
......
......@@ -122,6 +122,8 @@ QtObject {
property QtObject outgoing: QtObject {
property color backgroundColor: Colors.e
property int areaSize: 16
property int busyIndicatorSize: 16
property int sendIconSize: 12
property QtObject text: QtObject {
......
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