diff --git a/src/tui/app/app.rs b/src/tui/app/app.rs index ffbcb34..0b23320 100644 --- a/src/tui/app/app.rs +++ b/src/tui/app/app.rs @@ -65,7 +65,7 @@ pub trait IAppInteractInfo { pub trait IAppInteractReload { fn reload_library(&mut self); fn reload_database(&mut self); - fn go_back(&mut self); + fn hide_reload_menu(&mut self); } pub trait IAppInteractError { @@ -201,8 +201,7 @@ impl IAppInteractReload for App { self.refresh(previous, result); } - // FIXME: Rename to hide_reload_menu - fn go_back(&mut self) { + fn hide_reload_menu(&mut self) { assert!(self.state.is_reload()); self.state = AppState::Browse(()); } @@ -581,14 +580,14 @@ mod tests { } #[test] - fn reload_go_back() { + fn reload_hide_menu() { let mut app = App::new(music_hoard(COLLECTION.to_owned())); assert!(app.state().is_browse()); app.show_reload_menu(); assert!(app.state().is_reload()); - app.go_back(); + app.hide_reload_menu(); assert!(app.state().is_browse()); } diff --git a/src/tui/handler.rs b/src/tui/handler.rs index 6eb39c5..226d00c 100644 --- a/src/tui/handler.rs +++ b/src/tui/handler.rs @@ -109,7 +109,7 @@ impl IEventHandlerPrivate for EventHandler { KeyCode::Char('l') | KeyCode::Char('L') => app.reload_library(), KeyCode::Char('d') | KeyCode::Char('D') => app.reload_database(), // Return. - KeyCode::Char('g') | KeyCode::Char('G') => app.go_back(), + KeyCode::Char('g') | KeyCode::Char('G') => app.hide_reload_menu(), // Othey keys. _ => {} }