update to match connection.ConnectionStateToType name change for Goland

This commit is contained in:
Dan Ballard 2019-07-26 13:52:11 -07:00
parent f973a2bfe5
commit eca82ae45d
1 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ func IncomingListener(uiState *gothings.InterfaceState, subscribed chan bool) {
case event.SendMessageToPeerError: case event.SendMessageToPeerError:
uiState.AddSendMessageError(e.Data[event.RemotePeer], e.Data[event.Signature], e.Data[event.Error]) uiState.AddSendMessageError(e.Data[event.RemotePeer], e.Data[event.Signature], e.Data[event.Error])
case event.PeerStateChange: case event.PeerStateChange:
cxnState := connections.ConnectionStateType[e.Data[event.ConnectionState]] cxnState := connections.ConnectionStateToType[e.Data[event.ConnectionState]]
if contact, exists := the.Peer.GetProfile().Contacts[e.Data[event.RemotePeer]]; exists { if contact, exists := the.Peer.GetProfile().Contacts[e.Data[event.RemotePeer]]; exists {
uiContact := uiState.GetContact(contact.Onion) uiContact := uiState.GetContact(contact.Onion)
if uiContact != nil && uiContact.Status != int(cxnState) { if uiContact != nil && uiContact.Status != int(cxnState) {
@ -91,7 +91,7 @@ func IncomingListener(uiState *gothings.InterfaceState, subscribed chan bool) {
} }
case event.ServerStateChange: case event.ServerStateChange:
serverOnion := e.Data[event.GroupServer] serverOnion := e.Data[event.GroupServer]
state := connections.ConnectionStateType[e.Data[event.ConnectionState]] state := connections.ConnectionStateToType[e.Data[event.ConnectionState]]
groups := the.Peer.GetGroups() groups := the.Peer.GetGroups()
for _, groupID := range groups { for _, groupID := range groups {
group := the.Peer.GetGroup(groupID) group := the.Peer.GetGroup(groupID)