mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
21 lines
493 B
Rust
21 lines
493 B
Rust
use ratatui::layout::Rect;
|
|
use yazi_adapter::Dimension;
|
|
use yazi_shared::event::CmdCow;
|
|
|
|
use crate::{app::App, notify};
|
|
|
|
impl App {
|
|
pub(crate) fn update_notify(&mut self, cmd: CmdCow) {
|
|
let Dimension { rows, columns, .. } = Dimension::available();
|
|
let area =
|
|
notify::Notify::available(Rect { x: 0, y: 0, width: columns, height: rows });
|
|
|
|
self.core.notify.tick(cmd, area);
|
|
|
|
if self.core.notify.messages.is_empty() {
|
|
self.render();
|
|
} else {
|
|
self.render_partially();
|
|
}
|
|
}
|
|
}
|