Window is no longer a fiber, should prevent window from locking up due to a fiber not yielding, replaced ui's direct async calls with BackgroundWorker.foreground_job, show pulsing circle behind app logo on boot

This commit is contained in:
2022-02-12 08:47:48 -06:00
parent 202966fd08
commit 232ed2032f
11 changed files with 236 additions and 153 deletions

View File

@@ -13,17 +13,10 @@ class W3DHub
if !force_fetch && File.exist?(path)
path
else
internet = Async::HTTP::Internet.instance
response = internet.get(uri, W3DHub::Api::DEFAULT_HEADERS)
if response.success?
response.save(path, "wb")
return path
end
false
BackgroundWorker.job(
-> { Async::HTTP::Internet.instance.get(uri, W3DHub::Api::DEFAULT_HEADERS) },
->(response) { response.save(path, "wb") if response.success? }
)
end
end