diff --git a/go.mod b/go.mod index aa25554..e110966 100644 --- a/go.mod +++ b/go.mod @@ -6,5 +6,5 @@ require ( cwtch.im/cwtch v0.5.1 git.openprivacy.ca/openprivacy/connectivity v1.3.3 git.openprivacy.ca/openprivacy/log v1.0.2 - golang.org/x/mobile v0.0.0-20201217150744-e6ae53a27f4f // indirect + golang.org/x/mobile v0.0.0-20210208171126-f462b3930c8f // indirect ) diff --git a/go.sum b/go.sum index 47a1420..31f74f0 100644 --- a/go.sum +++ b/go.sum @@ -52,6 +52,8 @@ golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPI golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20201217150744-e6ae53a27f4f h1:kgfVkAEEQXXQ0qc6dH7n6y37NAYmTFmz0YRwrRjgxKw= golang.org/x/mobile v0.0.0-20201217150744-e6ae53a27f4f/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4= +golang.org/x/mobile v0.0.0-20210208171126-f462b3930c8f h1:aEcjdTsycgPqO/caTgnxfR9xwWOltP/21vtJyFztEy0= +golang.org/x/mobile v0.0.0-20210208171126-f462b3930c8f/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= diff --git a/lib.go b/lib.go index 35379cf..352f6b0 100644 --- a/lib.go +++ b/lib.go @@ -145,7 +145,7 @@ func c_GetAppBusEvent() *C.char { // GetAppBusEvent blocks until an event func GetAppBusEvent() string { var json = "" - for json != "" { + for json == "" { json = eventHandler.GetNextEvent() } return json diff --git a/utils/eventHandler.go b/utils/eventHandler.go index c34a7b8..2ea59a2 100644 --- a/utils/eventHandler.go +++ b/utils/eventHandler.go @@ -33,7 +33,7 @@ func NewEventHandler(application app.Application) *EventHandler { application.GetPrimaryBus().Subscribe(event.ReloadDone, appBusQueue) application.GetPrimaryBus().Subscribe(event.ACNVersion, appBusQueue) - return &EventHandler{appBusQueue: appBusQueue, profileQueues: make(map[string]event.Queue), profileEvents: make(chan EventProfileEnvelope)} + return &EventHandler{app: application, appBusQueue: appBusQueue, profileQueues: make(map[string]event.Queue), profileEvents: make(chan EventProfileEnvelope)} } func (eh *EventHandler) GetNextEvent() string {