mirror of
https://github.com/Rudi9719/kbtui.git
synced 2026-03-22 12:07:23 +00:00
only clearView when switching successfully?
This commit is contained in:
3
main.go
3
main.go
@ -188,16 +188,17 @@ func handleInput(g *gocui.Gui) error {
|
||||
case "/q":
|
||||
return gocui.ErrQuit
|
||||
case "/j":
|
||||
clearView(g, "Chat")
|
||||
if len(command) == 3 {
|
||||
channel.MembersType = keybase.TEAM
|
||||
channel.Name = command[1]
|
||||
channel.TopicName = command[2]
|
||||
printToView(g, "Feed", fmt.Sprintf("You have joined: @%s#%s", channel.Name, channel.TopicName))
|
||||
clearView(g, "Chat")
|
||||
} else if len(command) == 2 {
|
||||
channel.MembersType = keybase.USER
|
||||
channel.Name = command[1]
|
||||
printToView(g, "Feed", fmt.Sprintf("You have joined: @%s", channel.Name))
|
||||
clearView(g, "Chat")
|
||||
} else {
|
||||
printToView(g, "Feed", "To join a team use /j <team> <channel>")
|
||||
printToView(g, "Feed", "To join a PM use /j <user>")
|
||||
|
||||
Reference in New Issue
Block a user