Skip to content

Commit

Permalink
fix: cannot sort dynamic list
Browse files Browse the repository at this point in the history
  • Loading branch information
lijinke666 committed Feb 16, 2021
1 parent f996cb2 commit 3f670ac
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 💡 Lint Test and Build
name: 💡 Build

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ react-jinke-music-player
<img src="https://img.shields.io/npm/l/react-jinke-music-player.svg?style=flat-square" alt="npm"/>
</a>
<a href="https://github.com/lijinke666/react-music-player/actions">
<img src="https://github.com/lijinke666/react-music-player/workflows/Node%20CI/badge.svg" />
<img src="https://github.com/lijinke666/react-music-player/workflows/%F0%9F%92%A1%20Build/badge.svg" />
</a>
<a href="https://badge.fury.io/js/react-jinke-music-playerr" title="npm">
<img src="https://img.shields.io/npm/v/react-jinke-music-player.svg?style=flat-square" alt="npm version"/>
Expand Down
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2406,8 +2406,6 @@ export default class ReactJkMusicPlayer extends PureComponent {
} = nextProps
const isEqualAudioLists = arrayEqual(audioLists)(this.props.audioLists)
if (!isEqualAudioLists) {
this.initSortableAudioLists()

if (clearPriorAudioLists) {
this.changeAudioLists(nextProps)
} else {
Expand All @@ -2416,6 +2414,7 @@ export default class ReactJkMusicPlayer extends PureComponent {
if (!this.checkCurrentPlayingAudioIsInUpdatedAudioLists(nextProps)) {
this.initPlayer(audioLists, false)
}
setTimeout(() => this.initSortableAudioLists(), 200)
}
this.updatePlayIndex(
!isEqualAudioLists && clearPriorAudioLists
Expand Down

0 comments on commit 3f670ac

Please sign in to comment.