fix(CreateChat): Text input is displayed when choosing contacts for new chat
Applied the following solution agreed with design team: When a user types their message, hitting enter, or pressing send, should automatically create the chat and send the message, removing the 'To' input field and Confirm/Reject buttons (that means, directly navigating to the new created chat). Fixes #7706
This commit is contained in:
parent
c256ac0ac2
commit
4cdc2f8a91
|
@ -199,7 +199,7 @@ Item {
|
|||
|
||||
StatusButton {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
text: qsTr("Reject")
|
||||
text: qsTr("Cancel")
|
||||
type: StatusBaseButton.Type.Danger
|
||||
onClicked: root.rejected()
|
||||
}
|
||||
|
|
|
@ -19,6 +19,21 @@ Page {
|
|||
property var rootStore
|
||||
property var emojiPopup: null
|
||||
|
||||
QtObject {
|
||||
id: d
|
||||
|
||||
function createChat() {
|
||||
root.rootStore.createChatInitMessage = chatInput.textInput.text
|
||||
root.rootStore.createChatFileUrls = chatInput.fileUrls
|
||||
membersSelector.createChat()
|
||||
|
||||
membersSelector.cleanup()
|
||||
chatInput.textInput.clear()
|
||||
|
||||
Global.closeCreateChatView()
|
||||
}
|
||||
}
|
||||
|
||||
padding: 0
|
||||
|
||||
Behavior on opacity { NumberAnimation {}}
|
||||
|
@ -63,15 +78,7 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
onConfirmed: {
|
||||
root.rootStore.createChatInitMessage = chatInput.textInput.text
|
||||
root.rootStore.createChatFileUrls = chatInput.fileUrls
|
||||
createChat()
|
||||
|
||||
cleanup()
|
||||
chatInput.textInput.clear()
|
||||
Global.closeCreateChatView();
|
||||
}
|
||||
onConfirmed: { d.createChat() }
|
||||
|
||||
onRejected: {
|
||||
cleanup()
|
||||
|
@ -163,15 +170,8 @@ Page {
|
|||
root.rootStore.createChatStickerUrl = url;
|
||||
membersSelector.createChat();
|
||||
}
|
||||
onSendMessage: {
|
||||
root.rootStore.createChatInitMessage = chatInput.textInput.text
|
||||
root.rootStore.createChatFileUrls = chatInput.fileUrls
|
||||
membersSelector.createChat()
|
||||
|
||||
membersSelector.cleanup()
|
||||
chatInput.textInput.clear()
|
||||
Global.closeCreateChatView();
|
||||
}
|
||||
onSendMessage: { d.createChat() }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue