One more huge refactoring and quick connect widget working.
Refactored the way URTrator working with profiles - now everything that could be taken from internal cache will be taken from cache. The very same as with servers. Moved all callbacks from callbacks to events, so we achieve full asynchronity here and can launch anything in goroutines :). Moved MainWindow-related game launching functions into another file (mainwindow_launch.go). Made quick connect widget working. Note, that even if you're on Favorites and trying to connect to one of favorited servers but with quick connect - you still have to choose right profile near Launch button! Maybe something else I forget.
This commit is contained in:
@@ -131,11 +131,11 @@ func (p *Pooler) UpdateOneServer(server_address string) {
|
||||
}(server)
|
||||
wait.Wait()
|
||||
p.PingOneServer(server_address)
|
||||
Eventer.LaunchEvent("flushServers")
|
||||
Eventer.LaunchEvent("flushServers", map[string]string{})
|
||||
|
||||
Eventer.LaunchEvent("loadAllServers")
|
||||
Eventer.LaunchEvent("loadFavoriteServers")
|
||||
Eventer.LaunchEvent("serversUpdateCompleted")
|
||||
Eventer.LaunchEvent("loadAllServers", map[string]string{})
|
||||
Eventer.LaunchEvent("loadFavoriteServers", map[string]string{})
|
||||
Eventer.LaunchEvent("serversUpdateCompleted", map[string]string{})
|
||||
}
|
||||
|
||||
func (p *Pooler) UpdateServers(servers_type string) {
|
||||
@@ -153,11 +153,11 @@ func (p *Pooler) UpdateServers(servers_type string) {
|
||||
}
|
||||
wait.Wait()
|
||||
p.PingServers(servers_type)
|
||||
Eventer.LaunchEvent("flushServers")
|
||||
Eventer.LaunchEvent("flushServers", map[string]string{})
|
||||
|
||||
Eventer.LaunchEvent("loadAllServers")
|
||||
Eventer.LaunchEvent("loadFavoriteServers")
|
||||
Eventer.LaunchEvent("serversUpdateCompleted")
|
||||
Eventer.LaunchEvent("loadAllServers", map[string]string{})
|
||||
Eventer.LaunchEvent("loadFavoriteServers", map[string]string{})
|
||||
Eventer.LaunchEvent("serversUpdateCompleted", map[string]string{})
|
||||
}
|
||||
|
||||
// Updates information about specific server.
|
||||
|
Reference in New Issue
Block a user