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