diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2023-11-30 14:47:42 -0500 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2023-11-30 15:25:20 -0500 |
commit | 7cfcdcea4b4a4984cd6625a60e9fc2a44d0ec9c9 (patch) | |
tree | 1750ddaec58acedd89494447efa592417a9d9d2f /plugins/welcome.lua | |
parent | f91c4d2671012a52ac0ed988426fe8bbdb1216c9 (diff) | |
download | lite-xl-plugin-manager-7cfcdcea4b4a4984cd6625a60e9fc2a44d0ec9c9.tar.gz lite-xl-plugin-manager-7cfcdcea4b4a4984cd6625a60e9fc2a44d0ec9c9.zip |
Added in loading screen for welcome dialog.
Diffstat (limited to 'plugins/welcome.lua')
-rw-r--r-- | plugins/welcome.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/welcome.lua b/plugins/welcome.lua index a90ea82..f0d0401 100644 --- a/plugins/welcome.lua +++ b/plugins/welcome.lua @@ -98,14 +98,18 @@ command.add(EmptyView, { core.log("Installing addons...") loading = { percent = 0, label = "Initializing..." } core.redraw = true - PluginManager:install({ id = "meta_addons" }, { progress = function(progress) loading = progress end, restart = false }):done(function() + PluginManager:install({ id = "meta_addons" }, { progress = function(progress) + loading = progress + core.redraw = true + end, restart = false }):done(function() loading = false core.log("Addons installed!") terminate_welcome() command.perform("core:restart") end):fail(function(err) - loading = true - core.error(err) + loading = false + core.redraw = true + core.error(err or "Error installing addons.") end) end, ["welcome:open-plugin-manager"] = function() |