Merge branch 'android' of dan/ui into master

This commit is contained in:
erinn 2019-03-29 12:27:49 -07:00 committed by Gogs
commit 9ff099418f
3 changed files with 8 additions and 2 deletions

View File

@ -23,6 +23,7 @@ type GrandCentralDispatcher struct {
QMLEngine *qml.QQmlApplicationEngine
Translator *core.QTranslator
_ string `property:"os"`
_ string `property:"currentOpenConversation"`
_ float32 `property:"themeScale"`

View File

@ -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)

View File

@ -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, "<br>")
} 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 {
}
}
}
}
}