diff --git a/logging/server.go b/logging/server.go index 11fed00..b6a49ee 100644 --- a/logging/server.go +++ b/logging/server.go @@ -44,7 +44,9 @@ func StartServer() { func StopServer() { server.wg.Wait() - server.ln.Close() + if server.ln != nil { + server.ln.Close() + } } func handler(conn net.Conn) { diff --git a/menus.go b/menus.go index 8e33a15..20ab59c 100644 --- a/menus.go +++ b/menus.go @@ -15,8 +15,8 @@ var helpDialog = []menu.Item{ } func HelpMenu() { - ResetView() - defer ResetView() + ui.DefaultEvtStream.ResetHandlers() + defer ui.DefaultEvtStream.ResetHandlers() m := menu.NewMenu() m.TextFgColor = ui.ColorWhite @@ -32,7 +32,7 @@ func HelpMenu() { func FilterMenu() { ui.DefaultEvtStream.ResetHandlers() - defer ResetView() + defer ui.DefaultEvtStream.ResetHandlers() i := widgets.NewInput() i.TextFgColor = ui.ColorWhite @@ -49,8 +49,8 @@ func FilterMenu() { } func SortMenu() { - ResetView() - defer ResetView() + ui.DefaultEvtStream.ResetHandlers() + defer ui.DefaultEvtStream.ResetHandlers() m := menu.NewMenu() m.Selectable = true