yazi/yazi-core/src/tasks/commands/toggle.rs
2024-01-31 08:59:47 +08:00

19 lines
314 B
Rust

use yazi_shared::{event::Cmd, render};
use crate::tasks::Tasks;
pub struct Opt;
impl From<Cmd> for Opt {
fn from(_: Cmd) -> Self { Self }
}
impl From<()> for Opt {
fn from(_: ()) -> Self { Self }
}
impl Tasks {
pub fn toggle(&mut self, _: impl Into<Opt>) {
self.visible = !self.visible;
render!();
}
}