Don't rely on current_tab == "some_string", since we might change tab name.
This commit is contained in:
parent
063f6a622a
commit
26a3ead52a
@ -805,9 +805,9 @@ func (m *MainWindow) UpdateServers() {
|
|||||||
case data := <- done_chan:
|
case data := <- done_chan:
|
||||||
fmt.Println("Information about servers successfully gathered")
|
fmt.Println("Information about servers successfully gathered")
|
||||||
ctx.Database.UpdateServers(data)
|
ctx.Database.UpdateServers(data)
|
||||||
if current_tab == "Servers" {
|
if strings.Contains(current_tab, "Servers") {
|
||||||
ctx.Eventer.LaunchEvent("loadAllServers")
|
ctx.Eventer.LaunchEvent("loadAllServers")
|
||||||
} else {
|
} else if strings.Contains(current_tab, "Favorites") {
|
||||||
ctx.Eventer.LaunchEvent("loadFavoriteServers")
|
ctx.Eventer.LaunchEvent("loadFavoriteServers")
|
||||||
}
|
}
|
||||||
case <- error_chan:
|
case <- error_chan:
|
||||||
|
Reference in New Issue
Block a user