wip: refactor pt.7, 198 errors yay

This commit is contained in:
🪞👃🪞 2024-11-10 14:57:14 +01:00
parent 869d92110d
commit a1818a8504
6 changed files with 45 additions and 48 deletions

View file

@ -1,15 +1,15 @@
use crate::*;
#[derive(Copy, Clone, PartialEq)]
pub enum TransportViewCommand {
pub enum TransportAppCommand {
Focus(FocusCommand),
Transport(TransportCommand),
}
impl Handle<Tui> for TransportView<Tui> {
fn handle (&mut self, from: &TuiInput) -> Perhaps<bool> {
TransportViewCommand::execute_with_state(self, from)
TransportAppCommand::execute_with_state(self, from)
}
}
impl InputToCommand<Tui, TransportView<Tui>> for TransportViewCommand {
impl InputToCommand<Tui, TransportView<Tui>> for TransportAppCommand {
fn input_to_command (_: &TransportView<Tui>, input: &TuiInput) -> Option<Self> {
match input.event() {
key!(KeyCode::Char(' ')) => Some(Self::FocusPrev),