From kde-commits Sat May 14 18:35:25 2016 From: Martin Klapetek Date: Sat, 14 May 2016 18:35:25 +0000 To: kde-commits Subject: [spacebar] app/package/contents/ui: [app] Insert the emoji into the message when selected and close Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=146325094208559 Git commit f00eb4a7c25111f54065882371fa6329a7c4359d by Martin Klapetek. Committed on 14/05/2016 at 18:35. Pushed by mklapetek into branch 'master'. [app] Insert the emoji into the message when selected and close the popup M +12 -0 app/package/contents/ui/ConversationPage.qml http://commits.kde.org/spacebar/f00eb4a7c25111f54065882371fa6329a7c4359d diff --git a/app/package/contents/ui/ConversationPage.qml b/app/package/con= tents/ui/ConversationPage.qml index b4b3c49..b5fa9b8 100644 --- a/app/package/contents/ui/ConversationPage.qml +++ b/app/package/contents/ui/ConversationPage.qml @@ -36,6 +36,10 @@ Kirigami.Page { property QtObject conversation property string pageName: "conversationPage" = + signal insertEmoji(var emoji); + + signal focusTextInput(); + Kirigami.OverlaySheet { id: emojisRect z: 300 @@ -263,6 +267,14 @@ Kirigami.Page { } } = + Connections { + target: conversationPage + onInsertEmoji: { + messageTextField.insert(messageTextField.curso= rPosition, emoji + " "); + } + onFocusTextInput: { + messageTextField.forceActiveFocus(); + } } } =20