mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
feat: rerender images on terminal resume
This commit is contained in:
parent
f7743da8e5
commit
45a3bdf4ad
1 changed files with 3 additions and 1 deletions
|
|
@ -73,13 +73,15 @@ impl App {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn dispatch_stop(&mut self, state: bool, tx: Option<oneshot::Sender<()>>) {
|
fn dispatch_stop(&mut self, state: bool, tx: Option<oneshot::Sender<()>>) {
|
||||||
|
self.cx.manager.active_mut().preview_reset_image();
|
||||||
if state {
|
if state {
|
||||||
self.signals.stop_term(true);
|
self.signals.stop_term(true);
|
||||||
self.term = None;
|
self.term = None;
|
||||||
} else {
|
} else {
|
||||||
self.term = Some(Term::start().unwrap());
|
self.term = Some(Term::start().unwrap());
|
||||||
self.signals.stop_term(false);
|
self.signals.stop_term(false);
|
||||||
emit!(Render);
|
self.cx.manager.preview(self.cx.image_layer());
|
||||||
|
emit!(Hover);
|
||||||
}
|
}
|
||||||
if let Some(tx) = tx {
|
if let Some(tx) = tx {
|
||||||
tx.send(()).ok();
|
tx.send(()).ok();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue