Match naming
This commit is contained in:
parent
e8db0e98d5
commit
d5716b79e2
@ -163,7 +163,7 @@ impl IApp for App {
|
||||
if let Some(input) = self.inner_mut().input.take() {
|
||||
AppMode::Input(AppInputMode::new(input, self.state()))
|
||||
} else {
|
||||
AppMode::Browse(self.state())
|
||||
AppMode::State(self.state())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,8 +19,8 @@ pub enum AppState<B, I, R, S, F, M, E, C> {
|
||||
Critical(C),
|
||||
}
|
||||
|
||||
pub enum AppMode<BrowseMode, InputMode> {
|
||||
Browse(BrowseMode),
|
||||
pub enum AppMode<StateMode, InputMode> {
|
||||
State(StateMode),
|
||||
Input(InputMode),
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ impl<APP: IApp> IEventHandlerPrivate<APP> for EventHandler {
|
||||
|
||||
match app.mode() {
|
||||
AppMode::Input(input_mode) => Self::handle_input_key_event(input_mode, key_event),
|
||||
AppMode::Browse(browse_mode) => match browse_mode {
|
||||
AppMode::State(state_mode) => match state_mode {
|
||||
AppState::Browse(browse_state) => {
|
||||
Self::handle_browse_key_event(browse_state, key_event)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user