aboutsummaryrefslogtreecommitdiff
path: root/plugins/plugin_manager/init.lua
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2023-07-03 17:52:06 -0400
committerAdam Harrison <adamdharrison@gmail.com>2023-07-03 17:52:06 -0400
commit7b0dbf800bdfe7fe499dd0be293e0929708e9447 (patch)
treed1a8e47cfb79c018bd3ed71b48c3cb7ad8a923ba /plugins/plugin_manager/init.lua
parentfa98a6e8b27796d1d6245108ceb126b6ea984488 (diff)
downloadlite-xl-plugin-manager-7b0dbf800bdfe7fe499dd0be293e0929708e9447.tar.gz
lite-xl-plugin-manager-7b0dbf800bdfe7fe499dd0be293e0929708e9447.zip
Fixed issue with loading screen and refreshing.
Diffstat (limited to 'plugins/plugin_manager/init.lua')
-rw-r--r--plugins/plugin_manager/init.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/plugin_manager/init.lua b/plugins/plugin_manager/init.lua
index 87c2bad..cb09235 100644
--- a/plugins/plugin_manager/init.lua
+++ b/plugins/plugin_manager/init.lua
@@ -142,9 +142,9 @@ local function run(cmd, progress)
end
-function PluginManager:refresh(progress)
+function PluginManager:refresh(options)
local prom = Promise.new()
- run({ "list" }, progress):done(function(addons)
+ run({ "list" }, options.progress):done(function(addons)
self.addons = json.decode(addons)["addons"]
table.sort(self.addons, function(a,b) return a.id < b.id end)
self.valid_addons = {}
@@ -188,7 +188,7 @@ function PluginManager:get_addons()
if self.addons then
prom:resolve(self.addons)
else
- self:refresh():done(function()
+ self:refresh(options):done(function()
prom:resolve(self.addons)
end)
end