diff --git a/go/characters/appEventListener.go b/go/characters/appEventListener.go index cad1799f..d2c3c786 100644 --- a/go/characters/appEventListener.go +++ b/go/characters/appEventListener.go @@ -31,16 +31,18 @@ func AppEventListener(gcd *gothings.GrandCentralDispatcher, subscribed chan bool percent, _ := strconv.Atoi(progStr) message := e.Data[event.Status] var statuscode int - if percent == 0 { - statuscode = 0 - message = "can't find tor. is it running? is the controlport configured?" + if percent >= 0 && percent <= 25 { + statuscode = 1 + message = "Connecting to network" + } else if percent < 100 { + statuscode = 2 + message = "Establishng Tor circut" } else if percent == 100 { statuscode = 3 message = "tor appears to be running just fine!" - } else if percent < 80 { - statuscode = 1 } else { - statuscode = 2 + statuscode = 0 + message = "can't find tor. is it running? is the controlport configured?" } gcd.TorStatus(statuscode, message) diff --git a/main.go b/main.go index e5e75c88..02b06105 100644 --- a/main.go +++ b/main.go @@ -83,9 +83,9 @@ func main() { if *flagService { mainService() - } else { - mainUi(*flagLocal, *flagClientUI) + clientUI := *flagClientUI || runtime.GOOS == "android" + mainUi(*flagLocal, clientUI) } if the.ACN != nil { @@ -115,7 +115,7 @@ func mainService() { } func mainUi(flagLocal bool, flagClientUI bool) { - log.Infoln("I am the application") + log.Infof("I am the UI (client:%v)\n", flagClientUI) app := gui.NewQGuiApplication(len(os.Args), os.Args) diff --git a/qml/widgets/MyProfile.qml b/qml/widgets/MyProfile.qml index 0bdccec4..aa0c9432 100644 --- a/qml/widgets/MyProfile.qml +++ b/qml/widgets/MyProfile.qml @@ -66,7 +66,7 @@ ColumnLayout { Rectangle { //0: no tor, 1: progress 0%, 2: progress 1-99%, 3: DONE id: rectTorStatus - color: code == 3 ? "green": code == 2 ? "orange" : code == 1 ? "yellow" : "red" + color: code == 3 ? "green": code == 2 ? "yellow" : code == 1 ? "orange" : "red" width: 8 height: 8 radius: 2