summaryrefslogtreecommitdiff
path: root/limox.go
diff options
context:
space:
mode:
Diffstat (limited to 'limox.go')
-rw-r--r--limox.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/limox.go b/limox.go
index 6588b3d..2824776 100644
--- a/limox.go
+++ b/limox.go
@@ -26,8 +26,8 @@ type Limox struct {
JidEditor widget.Editor
PwdEditor widget.Editor
MainButton widget.Clickable
- sessionOut chan any
- sessionIn chan any
+ sessionIn chan any
+ sessionOut chan any
State LimoxState
Window *app.Window
Operations op.Ops
@@ -42,7 +42,7 @@ func NewLimox() Limox {
),
Operations: op.Ops{},
Theme: material.NewTheme(gofont.Collection()),
- sessionIn: make(chan any),
+ sessionOut: make(chan any),
State: Disconnected,
}
@@ -65,7 +65,7 @@ func (l *Limox) run() error {
}
l.draw(e)
}
- case data := <-l.sessionIn:
+ case data := <-l.sessionOut:
switch data.(type) {
case xmpp.SessionDisconnect:
l.State = Disconnected
@@ -86,13 +86,13 @@ func (l *Limox) buttonCallback() {
pwd := l.PwdEditor.Text()
setLastJid(jid)
setLastPwd(pwd)
- l.sessionOut = xmpp.StartSession(l.sessionIn, jid, pwd)
+ l.sessionIn = xmpp.StartSession(l.sessionOut, jid, pwd)
l.State = Connecting
case Connecting:
- go func() { l.sessionOut <- xmpp.SessionShouldDisconnect{} }()
+ go func() { l.sessionIn <- xmpp.SessionShouldDisconnect{} }()
l.State = Disconnected
case Connected:
- go func() { l.sessionOut <- xmpp.SessionShouldDisconnect{} }()
+ go func() { l.sessionIn <- xmpp.SessionShouldDisconnect{} }()
l.State = Disconnected
}
}