Skip to content

Commit

Permalink
Merge pull request #118 from EndCredits/fix-recent-play
Browse files Browse the repository at this point in the history
fix: Construct recent queue track id list as well
  • Loading branch information
Sherlockouo authored Feb 14, 2024
2 parents ceabf0c + 387cbf2 commit 8c039df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/web/pages/My/Recent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ const Recent = () => {

setHasMore(dataSource.length < resp.data.total)

const songIDList = resp.data ? resp.data.list.map((song: RecentSongs) => song.data.id) : []
let arr = [...songIDs, ...songIDList]
setSongIDs([...new Set(arr)])

const recentSongs = resp.data ? resp.data.list.map((song: RecentSongs) => song.data) : []

setDatasource(recentSongs)
Expand Down

0 comments on commit 8c039df

Please sign in to comment.