From 882a9abefba715c7db795f5ad96cefdc0ba9a6e9 Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Wed, 14 Aug 2019 15:30:24 -0700 Subject: [PATCH] changes in cwtch event.queue --- go/characters/appEventListener.go | 12 ++++++------ go/characters/incominglistener.go | 18 +++++++++--------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go/characters/appEventListener.go b/go/characters/appEventListener.go index 4aa1611d..8c837a45 100644 --- a/go/characters/appEventListener.go +++ b/go/characters/appEventListener.go @@ -13,12 +13,12 @@ import ( ) func AppEventListener(gcd *gothings.GrandCentralDispatcher, subscribed chan bool) { - q := event.NewEventQueue(1000) - the.AppBus.Subscribe(event.NewPeer, q.EventChannel) - the.AppBus.Subscribe(event.PeerError, q.EventChannel) - the.AppBus.Subscribe(event.AppError, q.EventChannel) - the.AppBus.Subscribe(event.ACNStatus, q.EventChannel) - the.AppBus.Subscribe(event.ReloadDone, q.EventChannel) + q := event.NewQueue() + the.AppBus.Subscribe(event.NewPeer, q) + the.AppBus.Subscribe(event.PeerError, q) + the.AppBus.Subscribe(event.AppError, q) + the.AppBus.Subscribe(event.ACNStatus, q) + the.AppBus.Subscribe(event.ReloadDone, q) subscribed <- true for { diff --git a/go/characters/incominglistener.go b/go/characters/incominglistener.go index ca45d994..c991d231 100644 --- a/go/characters/incominglistener.go +++ b/go/characters/incominglistener.go @@ -12,15 +12,15 @@ import ( ) func IncomingListener(uiState *gothings.InterfaceState, subscribed chan bool) { - q := event.NewEventQueue(1000) - the.EventBus.Subscribe(event.NewMessageFromPeer, q.EventChannel) - the.EventBus.Subscribe(event.PeerAcknowledgement, q.EventChannel) - the.EventBus.Subscribe(event.NewMessageFromGroup, q.EventChannel) - the.EventBus.Subscribe(event.NewGroupInvite, q.EventChannel) - the.EventBus.Subscribe(event.SendMessageToGroupError, q.EventChannel) - the.EventBus.Subscribe(event.SendMessageToPeerError, q.EventChannel) - the.EventBus.Subscribe(event.ServerStateChange, q.EventChannel) - the.EventBus.Subscribe(event.PeerStateChange, q.EventChannel) + q := event.NewQueue() + the.EventBus.Subscribe(event.NewMessageFromPeer, q) + the.EventBus.Subscribe(event.PeerAcknowledgement, q) + the.EventBus.Subscribe(event.NewMessageFromGroup, q) + the.EventBus.Subscribe(event.NewGroupInvite, q) + the.EventBus.Subscribe(event.SendMessageToGroupError, q) + the.EventBus.Subscribe(event.SendMessageToPeerError, q) + the.EventBus.Subscribe(event.ServerStateChange, q) + the.EventBus.Subscribe(event.PeerStateChange, q) subscribed <- true for {