mirror of
https://github.com/Rudi9719/kbtui.git
synced 2026-03-22 08:47:24 +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":
|
case "/q":
|
||||||
return gocui.ErrQuit
|
return gocui.ErrQuit
|
||||||
case "/j":
|
case "/j":
|
||||||
clearView(g, "Chat")
|
|
||||||
if len(command) == 3 {
|
if len(command) == 3 {
|
||||||
channel.MembersType = keybase.TEAM
|
channel.MembersType = keybase.TEAM
|
||||||
channel.Name = command[1]
|
channel.Name = command[1]
|
||||||
channel.TopicName = command[2]
|
channel.TopicName = command[2]
|
||||||
printToView(g, "Feed", fmt.Sprintf("You have joined: @%s#%s", channel.Name, channel.TopicName))
|
printToView(g, "Feed", fmt.Sprintf("You have joined: @%s#%s", channel.Name, channel.TopicName))
|
||||||
|
clearView(g, "Chat")
|
||||||
} else if len(command) == 2 {
|
} else if len(command) == 2 {
|
||||||
channel.MembersType = keybase.USER
|
channel.MembersType = keybase.USER
|
||||||
channel.Name = command[1]
|
channel.Name = command[1]
|
||||||
printToView(g, "Feed", fmt.Sprintf("You have joined: @%s", channel.Name))
|
printToView(g, "Feed", fmt.Sprintf("You have joined: @%s", channel.Name))
|
||||||
|
clearView(g, "Chat")
|
||||||
} else {
|
} else {
|
||||||
printToView(g, "Feed", "To join a team use /j <team> <channel>")
|
printToView(g, "Feed", "To join a team use /j <team> <channel>")
|
||||||
printToView(g, "Feed", "To join a PM use /j <user>")
|
printToView(g, "Feed", "To join a PM use /j <user>")
|
||||||
|
|||||||
Reference in New Issue
Block a user