mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Remove the last remaining sync. HTTP requests on the main thread
This commit is contained in:
parent
1e7f554bcd
commit
c3efcb3896
3 changed files with 150 additions and 37 deletions
|
@ -63,21 +63,12 @@ local function install_or_update_package(this, package)
|
|||
end
|
||||
|
||||
local function on_confirm()
|
||||
local has_hard_deps = contentdb.has_hard_deps(package)
|
||||
if has_hard_deps then
|
||||
local dlg = create_install_dialog(package)
|
||||
dlg:set_parent(this)
|
||||
this:hide()
|
||||
dlg:show()
|
||||
elseif has_hard_deps == nil then
|
||||
local dlg = messagebox("error_checking_deps",
|
||||
fgettext("Error getting dependencies for package"))
|
||||
dlg:set_parent(this)
|
||||
this:hide()
|
||||
dlg:show()
|
||||
else
|
||||
contentdb.queue_download(package, package.path and contentdb.REASON_UPDATE or contentdb.REASON_NEW)
|
||||
end
|
||||
local dlg = create_install_dialog(package)
|
||||
dlg:set_parent(this)
|
||||
this:hide()
|
||||
dlg:show()
|
||||
|
||||
dlg:load_deps()
|
||||
end
|
||||
|
||||
if package.type == "mod" and #pkgmgr.games == 0 then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue