Skip to content

Commit

Permalink
fix(player): Fix speed changes not taking effect until the next frame
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed May 24, 2024
1 parent bb61db7 commit fdd0d57
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/player/player.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,8 @@ func (p *Player) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
p.activeOption = 6
p.speed = 15
}
if !p.isPlaying() {
return p, p.play()
}
return p, nil
p.pause()
return p, p.play()
case tea.MouseMsg:
if msg.Action == tea.MouseActionRelease || msg.Button != tea.MouseButtonLeft {
return p, nil
Expand Down

0 comments on commit fdd0d57

Please sign in to comment.