Git commit 45fdca4c66279509e1cc8d047cca5499832e7b47 by Martin Klapetek. Committed on 14/05/2016 at 18:31. Pushed by mklapetek into branch 'master'. [app] Smarter handling of the Enter key when typing a message Now pressing Enter will only send the message if no modifier is pressed and only if the message actually can be send (valid channel), otherwise shows a toast notification. M +13 -2 app/package/contents/ui/ConversationPage.qml http://commits.kde.org/spacebar/45fdca4c66279509e1cc8d047cca5499832e7b47 diff --git a/app/package/contents/ui/ConversationPage.qml b/app/package/con= tents/ui/ConversationPage.qml index b90daa3..27adab0 100644 --- a/app/package/contents/ui/ConversationPage.qml +++ b/app/package/contents/ui/ConversationPage.qml @@ -211,8 +211,19 @@ Kirigami.Page { } = Keys.onReturnPressed: { - view.model.sendNewMessage(text); - text =3D ""; + if (event.modifiers =3D=3D Qt.NoModifier) { + if (conversation.canSendMessages) { + view.model.sendNewMessage(text); + text =3D ""; + } else { + // TODO better text + showPassiveNotification(i18n("You need to = connect first"), 3000); + } + } else if (event.modifiers !=3D Qt.NoModifier) { + event.accepted =3D false; + } + } + } } =