summaryrefslogtreecommitdiffstats
path: root/src/commands/show_workers.rs
blob: 50796737aa53da3dbf29f9e4042bd54621dfab74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use termion::event::Key;

use crate::context::AppContext;
use crate::error::JoshutoResult;
use crate::ui::views::TuiWorkerView;
use crate::ui::TuiBackend;

pub fn show_workers(
    context: &mut AppContext,
    backend: &mut TuiBackend,
    exit_key: &Key,
) -> JoshutoResult<()> {
    context.flush_event();

    let view = TuiWorkerView::new(exit_key.clone());
    view.display(context, backend);
    Ok(())
}