chore: resolve undefined-field

This commit is contained in:
Alexander Courtis
2024-10-26 14:55:46 +11:00
parent 52ff301e07
commit d663059c3e
3 changed files with 107 additions and 78 deletions

View File

@@ -66,9 +66,10 @@ function M.create_watcher(node)
return nil
end
---@param watcher Watcher
local function callback(watcher)
log.line("watcher", "node event scheduled refresh %s", watcher.context)
utils.debounce(watcher.context, M.config.filesystem_watchers.debounce_delay, function()
log.line("watcher", "node event scheduled refresh %s", watcher.data.context)
utils.debounce(watcher.data.context, M.config.filesystem_watchers.debounce_delay, function()
if watcher.destroyed then
return
end
@@ -82,7 +83,7 @@ function M.create_watcher(node)
end
M.uid = M.uid + 1
return Watcher:new(path, nil, callback, {
return Watcher:create(path, nil, callback, {
context = "explorer:watch:" .. path .. ":" .. M.uid,
})
end