Set typing Rectangle color directly instead of Connection

Co-authored-by: DeepBlueV7.X <nicolas.werner@hotmail.de>
This commit is contained in:
Lurkki14 2020-09-18 14:55:48 +03:00 committed by GitHub
parent 1f71f7227a
commit 8741e5f36a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -436,20 +436,11 @@ Page {
anchors.right: parent.right anchors.right: parent.right
Rectangle { Rectangle {
id: typingRect id: typingRect
Connections {
target: chat.model
onTypingUsersChanged: {
if (chat.model && chat.model.typingUsers < 1)
typingRect.color = "transparent"
else
typingRect.color = colors.window
}
}
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.leftMargin: 10 anchors.leftMargin: 10
anchors.rightMargin: 10 anchors.rightMargin: 10
color: "transparent" color: (chat.model && chat.model.typingUsers.length > 0) ? colors.window : "transparent"
height: fontMetrics.height + 10 height: fontMetrics.height + 10
Label { Label {
id: typingDisplay id: typingDisplay