diff options
author | xengineering <me@xengineering.eu> | 2023-06-27 15:49:31 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2023-06-27 15:49:31 +0200 |
commit | d27744d56b41aa9dd68502bd529dbf3fc083ed1d (patch) | |
tree | 2ab7a62b79814595ad64f398dc07ec08310fa583 | |
parent | 8715603ce1a713d1c8841382bb965cb55948fedd (diff) | |
download | limox-d27744d56b41aa9dd68502bd529dbf3fc083ed1d.tar limox-d27744d56b41aa9dd68502bd529dbf3fc083ed1d.tar.zst limox-d27744d56b41aa9dd68502bd529dbf3fc083ed1d.zip |
xmpp: Fix confusing terminology
-rw-r--r-- | limox.go | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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 } } |