wip: refactor pt.8, 512 errors lol

This commit is contained in:
🪞👃🪞 2024-11-10 15:40:45 +01:00
parent a1818a8504
commit a784f7a6f2
19 changed files with 238 additions and 183 deletions

View file

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