mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2026-03-22 04:06:18 +00:00
Progress towards background work replacement, work getting new NetworkManager and HttpClient up and running
This commit is contained in:
@@ -164,15 +164,15 @@ class W3DHub
|
||||
if Gosu.milliseconds >= @server_list_expire
|
||||
@server_list_expire = Gosu.milliseconds + 30_000
|
||||
|
||||
Api.on_thread(:server_list, 2) do |list|
|
||||
if list
|
||||
Api.on_thread(:server_list, 2) do |result|
|
||||
if result.okay?
|
||||
@server_list_expire = Gosu.milliseconds + SERVER_LIST_UPDATE_INTERVAL # five minutes
|
||||
|
||||
Store.server_list_last_fetch = Gosu.milliseconds
|
||||
|
||||
Api::ServerListUpdater.instance.refresh_server_list(list)
|
||||
Api::ServerListUpdater.instance.refresh_server_list(result.data)
|
||||
|
||||
BackgroundWorker.foreground_job(-> {}, ->(_) { States::Interface.instance&.update_server_browser(nil, :refresh_all) })
|
||||
Store.main_thread_queue << -> { States::Interface.instance&.update_server_browser(nil, :refresh_all) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user