mirror of
https://github.com/yattee/yattee.git
synced 2024-12-12 21:30:32 +05:30
Fix player window on Mac
This commit is contained in:
parent
67723f4624
commit
cf20d3344a
@ -33,7 +33,11 @@ enum Windows: String, CaseIterable {
|
||||
func open() {
|
||||
switch self {
|
||||
case .player:
|
||||
NSWorkspace.shared.open(URL(string: "yattee://\(location)")!)
|
||||
if let window = Self.playerWindow {
|
||||
window.makeKeyAndOrderFront(self)
|
||||
} else {
|
||||
NSWorkspace.shared.open(URL(string: "yattee://\(location)")!)
|
||||
}
|
||||
case .main:
|
||||
Self.main.focus()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user