mirror of
https://github.com/sxyazi/yazi.git
synced 2026-05-13 08:16:40 +00:00
feat: show error when image preview fails (#2706)
This commit is contained in:
parent
8ed569b729
commit
d6a01a63ef
22 changed files with 79 additions and 72 deletions
|
|
@ -12,8 +12,9 @@ function M:peek(job)
|
|||
end
|
||||
|
||||
ya.sleep(math.max(0, rt.preview.image_delay / 1000 + start - os.clock()))
|
||||
ya.image_show(cache, job.area)
|
||||
ya.preview_widgets(job, {})
|
||||
|
||||
local _, err = ya.image_show(cache, job.area)
|
||||
ya.preview_widget(job, err and ui.Text(tostring(err)):wrap(ui.Text.WRAP))
|
||||
end
|
||||
|
||||
function M:seek() end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue