Fixed favorite server addition and saving.
This commit is contained in:
@@ -245,6 +245,7 @@ func (f *FavoriteDialog) saveFavorite() error {
|
||||
ctx.Cache.Servers[key].Server.ExtendedConfig = f.server.ExtendedConfig
|
||||
ctx.Cache.Servers[key].Server.PlayersInfo = f.server.PlayersInfo
|
||||
|
||||
ctx.Eventer.LaunchEvent("flushServers", map[string]string{})
|
||||
ctx.Eventer.LaunchEvent("loadFavoriteServers", map[string]string{})
|
||||
f.window.Destroy()
|
||||
|
||||
|
@@ -135,7 +135,10 @@ func (m *MainWindow) addToFavorites() {
|
||||
|
||||
current_tab := m.tab_widget.GetTabLabelText(m.tab_widget.GetNthPage(m.tab_widget.GetCurrentPage()))
|
||||
|
||||
server_address := m.getIpFromServersList(current_tab)
|
||||
server_address := ""
|
||||
if !strings.Contains(current_tab, "Favorites") {
|
||||
server_address = m.getIpFromServersList(current_tab)
|
||||
}
|
||||
|
||||
// Getting server from database.
|
||||
m.favorite_dialog = &FavoriteDialog{}
|
||||
|
Reference in New Issue
Block a user