diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-02-10 22:09:58 -0500 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-02-11 09:33:06 -0500 |
commit | daf9d7b9afec8c598c0974c5d92263c3af5facf0 (patch) | |
tree | 5273968eb2b2ffc412ebe1894a96d13c9ae57d09 /src/commands/reload_dir.rs | |
parent | b09ecb650aa5805c7021ab76672dddc0a7b0bb52 (diff) |
progress on switching to tui-rs for ui
Diffstat (limited to 'src/commands/reload_dir.rs')
-rw-r--r-- | src/commands/reload_dir.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/commands/reload_dir.rs b/src/commands/reload_dir.rs index 4524e04..d1d6f5f 100644 --- a/src/commands/reload_dir.rs +++ b/src/commands/reload_dir.rs @@ -1,10 +1,10 @@ +use std::collections::hash_map::Entry; + use crate::commands::{JoshutoCommand, JoshutoRunnable}; use crate::context::JoshutoContext; use crate::error::JoshutoResult; use crate::fs::JoshutoDirList; -use crate::window::JoshutoView; - -use std::collections::hash_map::Entry; +use crate::ui::TuiBackend; #[derive(Clone, Debug)] pub struct ReloadDirList; @@ -48,11 +48,8 @@ impl std::fmt::Display for ReloadDirList { } impl JoshutoRunnable for ReloadDirList { - fn execute(&self, context: &mut JoshutoContext, view: &JoshutoView) -> JoshutoResult<()> { + fn execute(&self, context: &mut JoshutoContext, backend: &mut TuiBackend) -> JoshutoResult<()> { Self::reload(context.curr_tab_index, context)?; - let curr_tab = &mut context.tabs[context.curr_tab_index]; - curr_tab.refresh(view, &context.config_t); - ncurses::doupdate(); Ok(()) } } |