mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
clock: fix play/pause
This commit is contained in:
parent
9e8572ae0f
commit
5fa5a875b7
5 changed files with 21 additions and 22 deletions
|
|
@ -29,11 +29,11 @@ impl ClockCommand {
|
|||
state.pause_at(position)?;
|
||||
Ok(None)
|
||||
}
|
||||
fn toggle_playback (state: &mut Clock, position: Option<u32>) -> Perhaps<Self> {
|
||||
fn toggle_playback (state: &mut Clock, position: u32) -> Perhaps<Self> {
|
||||
if state.is_rolling() {
|
||||
state.pause_at(position)?;
|
||||
state.pause_at(Some(position))?;
|
||||
} else {
|
||||
state.play_from(position)?;
|
||||
state.play_from(Some(position))?;
|
||||
}
|
||||
Ok(None)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue