From 26a3ead52afa924fa7ea874262d71258489da29e Mon Sep 17 00:00:00 2001 From: pztrn Date: Tue, 4 Oct 2016 23:51:37 +0500 Subject: [PATCH] Don't rely on current_tab == "some_string", since we might change tab name. --- ui/mainwindow.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/mainwindow.go b/ui/mainwindow.go index 538d5fe..8a3f1cd 100644 --- a/ui/mainwindow.go +++ b/ui/mainwindow.go @@ -805,9 +805,9 @@ func (m *MainWindow) UpdateServers() { case data := <- done_chan: fmt.Println("Information about servers successfully gathered") ctx.Database.UpdateServers(data) - if current_tab == "Servers" { + if strings.Contains(current_tab, "Servers") { ctx.Eventer.LaunchEvent("loadAllServers") - } else { + } else if strings.Contains(current_tab, "Favorites") { ctx.Eventer.LaunchEvent("loadFavoriteServers") } case <- error_chan: