Skip to content

Commit

Permalink
- [fix] progress on stated episodes not showed on EpisodeCard and Epi…
Browse files Browse the repository at this point in the history
…sodePreview
  • Loading branch information
cardo-podcast committed Sep 25, 2024
1 parent e71d0d2 commit 469db0d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/engines/Episode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ export function useEpisode(episode: EpisodeData) {
}, [playing?.src, episode.src, reprState.position, playingPosition])

const inProgress = useCallback((mustBePlaying = false) => {
const isInPlayer = playing?.src == episode.src && (reprState.position > 0 && !reprState.complete)
const isStarted = playing?.src == episode.src || (reprState.position > 0 && !reprState.complete)
if (mustBePlaying) {
return isInPlayer && !paused
return isStarted && !paused
} else {
return isInPlayer
return isStarted
}
}, [playing?.src, episode.src, reprState.position, reprState.complete, paused])

Expand Down

0 comments on commit 469db0d

Please sign in to comment.