Fix client flag not being set right causing two LoadProfile messages to be issued causing error causing erroneous CreatePeers
the build was successful Details

Also "fix" status and color signals for ACN booting (after observing it
going white briefly)
This commit is contained in:
Dan Ballard 2019-09-10 16:36:45 -07:00
parent 6af91b71c1
commit 81c0047c20
3 changed files with 12 additions and 10 deletions

View File

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

View File

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

View File

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