mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
- add low battery notification with option to select battery level (disabled/3%/5%/10%/15%/20%/30%/40%/50%)
This commit is contained in:
@@ -67,14 +67,8 @@ extension AppDelegate {
|
||||
}
|
||||
|
||||
if IsNewestVersion(currentVersion: prevVersion, latestVersion: currentVersion) {
|
||||
let notification = NSUserNotification()
|
||||
notification.identifier = "updated-from-\(prevVersion)-to-\(currentVersion)"
|
||||
notification.title = "Successfully updated"
|
||||
notification.subtitle = "Stats was updated to the v\(currentVersion)"
|
||||
notification.soundName = NSUserNotificationDefaultSoundName
|
||||
notification.hasActionButton = false
|
||||
|
||||
NSUserNotificationCenter.default.deliver(notification)
|
||||
showNotification(title: "Successfully updated", subtitle: "Stats was updated to the v\(currentVersion)", id: "updated-from-\(prevVersion)-to-\(currentVersion)"
|
||||
)
|
||||
}
|
||||
|
||||
os_log(.debug, log: log, "Detected previous version %s. Current version (%s) set", prevVersion, currentVersion)
|
||||
|
||||
Reference in New Issue
Block a user