Skip to content

Commit

Permalink
Work around issue with replacing tracklist option
Browse files Browse the repository at this point in the history
If you double-click the tracklist, it would duplicate with the refactor.
  • Loading branch information
NattyNarwhal committed Jun 27, 2024
1 parent 34bd0d0 commit 47ff6e8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Submariner/SBTracklistController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ import Cocoa

// #MARK: - IBActions

override func trackDoubleClick(_ sender: Any!) {
// We have to override this because if the replace tracklist option is enabled,
// it duplicates the tracklist
SBPlayer.sharedInstance().play(index: self.selectedTrackRow)
}

@IBAction func delete(_ sender: Any) {
if playlistTableView.selectedRow != -1 {
SBPlayer.sharedInstance().remove(trackIndexSet: playlistTableView.selectedRowIndexes)
Expand Down

0 comments on commit 47ff6e8

Please sign in to comment.