wip: move to layered handlers
Some checks are pending
/ build (push) Waiting to run

This commit is contained in:
🪞👃🪞 2025-04-28 04:49:28 +03:00
parent 3561867640
commit 5696cbbebb
6 changed files with 45 additions and 68 deletions

View file

@ -1,12 +1,13 @@
use crate::*;
handle!(TuiIn: |self: MidiPool, input|{
Ok(if let Some(command) = match self.mode() {
Some(PoolMode::Rename(..)) => self.keys_rename,
Some(PoolMode::Length(..)) => self.keys_length,
Some(PoolMode::Import(..)) | Some(PoolMode::Export(..)) => self.keys_file,
_ => self.keys
}.command::<Self, PoolCommand, TuiIn>(self, input) {
//Ok(if let Some(command) = match self.mode() {
//Some(PoolMode::Rename(..)) => self.keys_rename,
//Some(PoolMode::Length(..)) => self.keys_length,
//Some(PoolMode::Import(..)) | Some(PoolMode::Export(..)) => self.keys_file,
//_ => self.keys
//}.command::<Self, PoolCommand, TuiIn>(self, input) {
Ok(if let Some(command) = self.keys.command(self, input) {
let _undo = command.execute(self)?;
Some(true)
} else {