fix: hide replybox after sending a message

This commit is contained in:
Richard Ramos 2020-07-27 11:38:26 -04:00 committed by Michael Bradley
parent e91cd9e610
commit 13f8875263
2 changed files with 3 additions and 2 deletions

View File

@ -25,13 +25,14 @@ Item {
onClicked: {
if(chatColumn.isImage){
chatsModel.sendImage(sendImageArea.image);
chatColumn.hideExtendedArea();
}
if(txtData.text.trim() > 0){
chatsModel.sendMessage(txtData.text, chatColumn.isReply ? SelectedMessage.messageId : "")
txtData.text = "";
}
chatColumn.hideExtendedArea();
}
background: Rectangle {
color: parent.enabled ? Style.current.blue : Style.current.grey

View File

@ -37,7 +37,6 @@ Rectangle {
if (event.modifiers === Qt.NoModifier && (event.key === Qt.Key_Enter || event.key === Qt.Key_Return)) {
if(chatColumn.isImage){
chatsModel.sendImage(sendImageArea.image);
chatColumn.hideExtendedArea();
}
if(txtData.text.trim().length > 0){
@ -48,6 +47,7 @@ Rectangle {
sendMessageSound.stop()
Qt.callLater(sendMessageSound.play);
}
chatColumn.hideExtendedArea();
}
}