From 0f81b4430a0ff4644cd1c373206f2b019bfbc996 Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Tue, 26 Mar 2019 13:47:47 -0700 Subject: [PATCH] disable emoji parsing code on android for now to enable typing --- go/gothings/gcd.go | 1 + main.go | 1 + qml/overlays/ChatOverlay.qml | 8 ++++++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/go/gothings/gcd.go b/go/gothings/gcd.go index d8bef4e6..f4bbc447 100644 --- a/go/gothings/gcd.go +++ b/go/gothings/gcd.go @@ -23,6 +23,7 @@ type GrandCentralDispatcher struct { QMLEngine *qml.QQmlApplicationEngine Translator *core.QTranslator + _ string `property:"os"` _ string `property:"currentOpenConversation"` _ float32 `property:"themeScale"` diff --git a/main.go b/main.go index 83867ebf..4d59a0e1 100644 --- a/main.go +++ b/main.go @@ -43,6 +43,7 @@ func main() { // our globals gcd := gothings.NewGrandCentralDispatcher(nil) + gcd.SetOs(runtime.GOOS) gcd.UIState = gothings.NewUIState(gcd) the.AcknowledgementIDs = make(map[string][]*the.AckId) gcd.OutgoingMessages = make(chan gobjects.Letter, 1000) diff --git a/qml/overlays/ChatOverlay.qml b/qml/overlays/ChatOverlay.qml index e3a58be9..9eb2c636 100644 --- a/qml/overlays/ChatOverlay.qml +++ b/qml/overlays/ChatOverlay.qml @@ -139,7 +139,7 @@ ColumnLayout { property bool skipOneUpdate: false Keys.onReturnPressed: { // CTRL+ENTER = LINEBREAK - if (event.modifiers & Qt.ControlModifier) { + if ((event.modifiers & Qt.ControlModifier) && gcd.os != "android") { txtMessage.insert(txtMessage.cursorPosition, "
") } else if (event.modifiers == Qt.NoModifier) { btnSend.clicked() @@ -150,6 +150,10 @@ ColumnLayout { // while also stripping any other tag, including other images. // TODO: this probably breaks if people actually do want to paste html onTextChanged: { + if (gcd.os == "android") { + return + } + //console.log("onTextChanged()") // we're taking advantage of TextEdit.getText()'s parsing capability, which means occasionally @@ -269,4 +273,4 @@ ColumnLayout { } } } -} \ No newline at end of file +}