diff --git a/ui/app/AppLayouts/Chat/panels/InlineSelectorPanel.qml b/ui/app/AppLayouts/Chat/panels/InlineSelectorPanel.qml index d66ad10e81..844f56ffd1 100644 --- a/ui/app/AppLayouts/Chat/panels/InlineSelectorPanel.qml +++ b/ui/app/AppLayouts/Chat/panels/InlineSelectorPanel.qml @@ -199,7 +199,7 @@ Item { StatusButton { Layout.alignment: Qt.AlignVCenter - text: qsTr("Reject") + text: qsTr("Cancel") type: StatusBaseButton.Type.Danger onClicked: root.rejected() } diff --git a/ui/app/AppLayouts/Chat/views/CreateChatView.qml b/ui/app/AppLayouts/Chat/views/CreateChatView.qml index 8e4ad5f57f..70f7a4488f 100644 --- a/ui/app/AppLayouts/Chat/views/CreateChatView.qml +++ b/ui/app/AppLayouts/Chat/views/CreateChatView.qml @@ -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() } } }