mirror of
https://github.com/sxyazi/yazi.git
synced 2024-12-17 22:01:32 +03:00
fix: reset image rendering and skip peeking if the TUI in the background (#1833)
This commit is contained in:
parent
60cfa7dba9
commit
56f9a6a1eb
@ -1,3 +1,4 @@
|
||||
use yazi_proxy::HIDER;
|
||||
use yazi_shared::{event::{Cmd, Data}, fs::Url};
|
||||
|
||||
use crate::manager::Manager;
|
||||
@ -30,6 +31,9 @@ impl Manager {
|
||||
let Some(hovered) = self.hovered().cloned() else {
|
||||
return self.active_mut().preview.reset();
|
||||
};
|
||||
if HIDER.try_acquire().is_err() {
|
||||
return self.active_mut().preview.reset_image();
|
||||
}
|
||||
|
||||
let mime = self.mimetype.get_owned(&hovered.url).unwrap_or_default();
|
||||
let folder = self.active().hovered_folder().map(|f| (f.offset, f.cha));
|
||||
|
Loading…
Reference in New Issue
Block a user