Fixed application taskbar not hiding after task completion, implemented basic uninstaller task, server browser is only told to update from updater if server data has actually changed, added Interface.instance method- fixes assuming window.current_state is a Interface instance.

This commit is contained in:
2021-12-30 15:47:42 -06:00
parent d880d1525f
commit 1214c35fb5
8 changed files with 116 additions and 14 deletions

View File

@@ -25,7 +25,11 @@ class W3DHub
@status.instance_variable_set(:@player_count, hash[:numplayers] || 0)
@status.instance_variable_set(:@started, hash[:started])
@status.instance_variable_set(:@remaining, hash[:remaining])
return true
end
false
end
class Status

View File

@@ -105,9 +105,8 @@ class W3DHub
id, data = rpc[:arguments]
server = Store.server_list.find { |s| s.id == id }
server&.update(data)
state = window.current_state
state.update_server_browser(server) if state.is_a?(States::Interface) && server
server_updated = server&.update(data)
States::Interface.instance&.update_server_browser(server) if server_updated
end
end
end