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

@@ -94,7 +94,7 @@ class W3DHub
end
def uninstall(app_id, channel)
puts "Uninstall Request: #{app_id} #{channel}"
puts "Uninstall Request: #{app_id}-#{channel}"
return false if !installed?(app_id, channel) || installing?(app_id, channel)
@@ -297,6 +297,11 @@ class W3DHub
listed_version > current_version
end
def uninstalled!(task)
Store.settings[:games].delete(:"#{task.app_id}_#{task.release_channel}")
Store.settings.save_settings
end
# No application tasks are being done
def idle?
!busy?
@@ -314,6 +319,8 @@ class W3DHub
def start_next_available_task
return unless idle?
@tasks.delete_if { |t| t.state == :complete || t.state == :halted || t.state == :failed }
task = @tasks.find { |t| t.state == :not_started }
task&.start
end