Skip to content

Commit

Permalink
[C-4268] Fix player sagas prev functionality for premium track previe…
Browse files Browse the repository at this point in the history
…ws (#8094)
  • Loading branch information
Kyle-Shanks authored Apr 11, 2024
1 parent 345d3df commit 93c3292
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions packages/web/src/common/store/player/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,14 @@ const {
error: errorAction
} = playerActions

const { getTrackId, getUid, getCounter, getPlaying, getPlaybackRate } =
playerSelectors
const {
getTrackId,
getUid,
getCounter,
getPlaying,
getPlaybackRate,
getPreviewing
} = playerSelectors

const { recordListen } = tracksSocialActions
const { getTrack } = cacheTracksSelectors
Expand Down Expand Up @@ -261,11 +267,14 @@ export function* watchReset() {
} else {
const playerUid = yield* select(getUid)
const playerTrackId = yield* select(getTrackId)
const isPreviewing = yield* select(getPreviewing)
if (playerUid && playerTrackId) {
yield* put(
play({
uid: playerUid,
trackId: playerTrackId,
// NOTE: isPreviewing can be passed as isPreview here bc we are restarting the track
isPreview: isPreviewing,
onEnd: queueActions.next
})
)
Expand Down

0 comments on commit 93c3292

Please sign in to comment.