Skip to content

Commit

Permalink
Properly stop on TimeStop action
Browse files Browse the repository at this point in the history
  • Loading branch information
vojd committed Aug 25, 2023
1 parent 326d8a3 commit ac504bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ pub fn handle_actions(
app_state.playback_time,
&app_state.modifier,
PlaybackControl::Stop,
)
);
app_state.play_mode = PlayMode::Paused;
log::debug!("Stopped");
}
Action::TogglePlayPause => match app_state.play_mode {
PlayMode::Playing => {
Expand Down
1 change: 0 additions & 1 deletion src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ pub fn top_bar(
ui.label(time);

if ui.button("⏹").clicked() {
actions.push(Action::TogglePlayPause);
actions.push(Action::TimeStop);
}
// rewind
Expand Down

0 comments on commit ac504bc

Please sign in to comment.