close window

and re-add stop because that should've been there
parent dadb6ef4
No preview for this file type
......@@ -700,7 +700,9 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" id="rVg-3t-n8B">
<font key="font" metaFont="system"/>
<string key="title">hello, my apologies but this app requires a window for discord to notice us. you're welcome to close it, we just have to have had a window</string>
<string key="title">hello, my apologies but this app requires a window for discord to notice us. you're welcome to close it, we just have to have had a window
also should've probably closed itself</string>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
......
......@@ -45,6 +45,8 @@ class ViewController: NSViewController {
// Show rich presence.
Discord_Initialize(appIdUnsafePointer, nil, 1, nil)
// Close window immediately.
self.view.window?.close()
Timer.scheduledTimer(timeInterval: 15.0, target: self, selector: #selector(updateEmbed), userInfo: nil, repeats: true)
}
......@@ -80,9 +82,12 @@ class ViewController: NSViewController {
} else if (playerState == iTunesEPlS.iTunesEPlSPaused) {
details = "Paused."
state = "Holding your spot in the beat."
} else if (playerState == iTunesEPlS.iTunesEPlSStopped) {
details = "iTunes is stopped."
state = "Nothing's happening."
} else {
details = "Something unknown happened."
state = "Maybe iTunes got some new playing states? :/"
details = "iTunes is most likely closed."
state = "If so, please quit this app. If not, please file a bug."
}
} else {
// We're in the stopped state.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment