moved block for mod_list out of app
This commit is contained in:
@@ -21,7 +21,9 @@ pub fn run(root_config: &mut RootConfig) -> anyhow::Result<()> {
|
||||
#[derive(Debug)]
|
||||
struct App<'a> {
|
||||
root_config: &'a mut RootConfig,
|
||||
|
||||
exit: bool,
|
||||
active_modal: bool,
|
||||
|
||||
mod_list_state: TableState,
|
||||
selected_instance: Option<String>,
|
||||
@@ -37,6 +39,7 @@ impl<'a> App<'a> {
|
||||
mod_list_state: state,
|
||||
selected_instance: None,
|
||||
exit: false,
|
||||
active_modal: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,16 +158,7 @@ impl<'a> Widget for &mut App<'a> {
|
||||
|
||||
InstanceSelect::new(self.selected_instance.clone()).render(chunks[0], buf);
|
||||
|
||||
let list_block = Block::default()
|
||||
.title("Mod list")
|
||||
.borders(Borders::ALL)
|
||||
.style(Style::default());
|
||||
|
||||
ModList::new(self.root_config).block(list_block).render(
|
||||
chunks[1],
|
||||
buf,
|
||||
&mut self.mod_list_state,
|
||||
);
|
||||
ModList::new(self.root_config).render(chunks[1], buf, &mut self.mod_list_state);
|
||||
|
||||
StatusBar.render(chunks[2], buf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user