mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
wip: remove redundant type param
This commit is contained in:
parent
c033a5618b
commit
df3dac183e
12 changed files with 113 additions and 125 deletions
|
|
@ -1,22 +1,16 @@
|
|||
use crate::*;
|
||||
|
||||
handle!(TransportToolbar |self, e| {
|
||||
match e {
|
||||
AppEvent::Input(Event::Key(KeyEvent { code: KeyCode::Right, .. })) => {
|
||||
self.focus_next();
|
||||
Ok(true)
|
||||
},
|
||||
AppEvent::Input(Event::Key(KeyEvent { code: KeyCode::Left, .. })) => {
|
||||
self.focus_prev();
|
||||
Ok(true)
|
||||
},
|
||||
AppEvent::Input(Event::Key(KeyEvent { code: KeyCode::Char(' '), .. })) => {
|
||||
self.toggle_play();
|
||||
Ok(true)
|
||||
},
|
||||
_ => self.focused_mut().handle(e)
|
||||
impl Handle<Tui, bool> for TransportToolbar {
|
||||
fn handle (&mut self, from: &Tui) -> Perhaps<bool> {
|
||||
Ok(
|
||||
from.key(KeyCode::Right).does(||self.focus_next())?
|
||||
||
|
||||
from.key(KeyCode::Left).does(||self.focus_prev())?
|
||||
||
|
||||
from.key(KeyCode::Char(' ')).does(||self.toggle_play())?
|
||||
)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
handle!(TransportPlayPauseButton |self, _e| Ok(false));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue