mirror of
https://github.com/danbee/persephone
synced 2025-03-04 08:39:11 +00:00
Double clicking the header no longer plays a track
This commit is contained in:
parent
e6e020d23c
commit
3e735893a2
@ -58,8 +58,10 @@ class QueueViewController: NSViewController, NSOutlineViewDataSource, NSOutlineV
|
|||||||
|
|
||||||
let queuePos = view.selectedRow - 1
|
let queuePos = view.selectedRow - 1
|
||||||
|
|
||||||
|
if queuePos >= 0 {
|
||||||
AppDelegate.mpdClient.playTrack(queuePos: queuePos)
|
AppDelegate.mpdClient.playTrack(queuePos: queuePos)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@objc func stateChanged(_ notification: Notification) {
|
@objc func stateChanged(_ notification: Notification) {
|
||||||
guard let state = notification.userInfo?[Notification.stateKey] as? MPDClient.Status.State
|
guard let state = notification.userInfo?[Notification.stateKey] as? MPDClient.Status.State
|
||||||
@ -187,8 +189,15 @@ class QueueViewController: NSViewController, NSOutlineViewDataSource, NSOutlineV
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func outlineView(_ outlineView: NSOutlineView, shouldSelectItem item: Any) -> Bool {
|
func outlineView(
|
||||||
return item is SongItem
|
_ outlineView: NSOutlineView,
|
||||||
|
selectionIndexesForProposedSelection proposedSelectionIndexes: IndexSet
|
||||||
|
) -> IndexSet {
|
||||||
|
if proposedSelectionIndexes.contains(0) {
|
||||||
|
return IndexSet.init()
|
||||||
|
} else {
|
||||||
|
return proposedSelectionIndexes
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@IBOutlet var queueView: NSOutlineView!
|
@IBOutlet var queueView: NSOutlineView!
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user