Add support in the entry function for Yazi stable release

This commit is contained in:
Diogo Duarte
2024-12-03 21:43:32 +00:00
parent e755ebc1e6
commit 20ece7e1ef

View File

@@ -194,8 +194,11 @@ local delete_all_bookmarks = ya.sync(function(state)
end) end)
return { return {
entry = function(_, job) entry = function(_, job_or_args)
local action = job.args[1] -- TODO: DEPRECATE IN Yazi 0.4
-- https://github.com/sxyazi/yazi/pull/1966
local args = job_or_args.args or job_or_args
local action = args[1]
if not action then if not action then
return return
end end
@@ -233,7 +236,7 @@ return {
return return
end end
-- TODO: DEPRECATED -- TODO: DEPRECATED Yazi 0.4
if args.save_last_directory then if args.save_last_directory then
_save_last_directory() _save_last_directory()
elseif type(args.last_directory) == "table" then elseif type(args.last_directory) == "table" then