mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2024-11-21 01:52:01 -08:00
Merge branch 'master' into IQ_Roster
This commit is contained in:
commit
f8f820170e
@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// Windows
|
||||
// Windows
|
||||
chatLogWindow = "clw" // Where (received and sent) messages are logged
|
||||
chatInputWindow = "iw" // Where messages are written
|
||||
rawInputWindow = "rw" // Where raw stanzas are written
|
||||
@ -194,7 +194,6 @@ func setKeyBindings(g *gocui.Gui) {
|
||||
if err := g.SetKeybinding(disconnectMsg, gocui.KeyEnter, gocui.ModNone, delMsg); err != nil {
|
||||
log.Panicln(err)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// General
|
||||
@ -216,7 +215,7 @@ func getLine(g *gocui.Gui, v *gocui.View) error {
|
||||
if len(cv.ViewBufferLines()) == 0 {
|
||||
printContactsToWindow(g, viewState.contacts)
|
||||
}
|
||||
} else if l == disconnect {
|
||||
} else if l == disconnect {
|
||||
maxX, maxY := g.Size()
|
||||
msg := "You disconnected from the server. Press enter to quit."
|
||||
if v, err := g.SetView(disconnectMsg, maxX/2-30, maxY/2, maxX/2-29+len(msg), maxY/2+2, 0); err != nil {
|
||||
@ -227,7 +226,7 @@ func getLine(g *gocui.Gui, v *gocui.View) error {
|
||||
if _, err := g.SetCurrentView(disconnectMsg); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
killChan <- disconnectErr
|
||||
} else if l == askServerForRoster {
|
||||
chlw, _ := g.View(chatLogWindow)
|
||||
|
Loading…
Reference in New Issue
Block a user