Skip to content

Commit

Permalink
feat: refresh queue on tracklist item block
Browse files Browse the repository at this point in the history
  • Loading branch information
cdrani committed May 15, 2024
1 parent 0eee5e2 commit e6024a3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/models/tracklist/tracklist-icon.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import { parseNodeString } from '../../utils/parser.js'
import { trackSongInfo, currentSongInfo } from '../../utils/song.js'

import Queue from '../queue.js'

export default class TrackListIcon {
constructor({ key, store, selector }) {
this._key = key
this._store = store
this._selector = selector
this._seen = new Set()
this._queue = new Queue()
}

#getIcon(row) {
Expand Down Expand Up @@ -76,6 +79,10 @@ export default class TrackListIcon {
})

this.skipJustBlockedSong({ isSkipped: savedTrack.isSkipped, row })

if (savedTrack.isSkipped) {
await this._queue.refreshQueue()
}
}

#getRow(icon) {
Expand Down

0 comments on commit e6024a3

Please sign in to comment.