Skip to content

Commit 088887c

Browse files
fix: enables the send message shortcut only for active chat (#322)
fix: Disables sending message shortcut instead of filtering in `Shortcut::activated` signal handler Co-authored-by: Ivan Lebedev <ilebedev@flightpath3d.com>
1 parent b7a9787 commit 088887c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

ChatView/qml/RootItem.qml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -514,11 +514,8 @@ ChatRootView {
514514

515515
sequences: ["Ctrl+Return", "Ctrl+Enter"]
516516
context: Qt.WindowShortcut
517-
onActivated: {
518-
if (messageInput.activeFocus && !Qt.inputMethod.visible && !fileMentionPopup.visible) {
519-
root.sendChatMessage()
520-
}
521-
}
517+
enabled: messageInput.activeFocus && !Qt.inputMethod.visible && !fileMentionPopup.visible
518+
onActivated: root.sendChatMessage()
522519
}
523520

524521
function clearChat() {

0 commit comments

Comments
 (0)