refactor: remove compatibility code for Yazi 0.3
This commit is contained in:
@@ -1060,10 +1060,6 @@ function M:setup(opts)
|
||||
end
|
||||
|
||||
function M:fetch(job)
|
||||
-- TODO: remove this once Yazi 0.4 is released
|
||||
local not_v4 = not job
|
||||
job = job or self
|
||||
|
||||
local opts = options()
|
||||
local merged_files = ya.dict_merge(FILES, opts.with_files or {})
|
||||
local merged_exts = ya.dict_merge(EXTS, opts.with_exts or {})
|
||||
@@ -1089,12 +1085,11 @@ function M:fetch(job)
|
||||
|
||||
if next(updates) then
|
||||
ya.manager_emit("update_mimes", { updates = updates })
|
||||
ya.manager_emit("update_mimetype", { updates = updates }) -- TODO: remove this
|
||||
end
|
||||
|
||||
if #unknown > 0 then
|
||||
job.files = unknown
|
||||
return not_v4 and require("mime").fetch(job) or require("mime"):fetch(job)
|
||||
return require("mime"):fetch(job)
|
||||
end
|
||||
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user