fix(StatusChatInput): ensure send button is disabled when message limit is exceeded

This was missing in the previous work we've done to make the `StatusChatInput` work
as a status timeline update component.

This commit also adds an event handler which was missing to trigger the `onMessage`
event when the send button is clicked.
This commit is contained in:
Pascal Precht 2020-12-17 11:08:30 +01:00 committed by Iuri Matias
parent 8a1a265036
commit 400b020118
1 changed files with 6 additions and 2 deletions

View File

@ -748,8 +748,12 @@ Rectangle {
anchors.rightMargin: Style.current.halfPadding
anchors.bottom: parent.bottom
visible: imageBtn2.visible
highlighted: chatsModel.plainText(Emoji.deparse(messageInputField.text).trim()).trim().length > 0 || isImage
enabled: highlighted
highlighted: chatsModel.plainText(Emoji.deparse(messageInputField.text)).length > 0 || isImage
enabled: highlighted && messageInputField.length < messageLimit
onClicked: function (event) {
control.sendMessage(event)
control.hideExtendedArea();
}
}
StatusIconButton {