Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Commit

Permalink
don't check if the notification was delivered on high sierra
Browse files Browse the repository at this point in the history
  • Loading branch information
btoews committed Jul 26, 2017
1 parent d68da39 commit a2cdc5a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions SoftU2FTool/UserPresence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,17 @@ class UserPresence: NSObject {

extension UserPresence: NSUserNotificationCenterDelegate {
func userNotificationCenter(_ center: NSUserNotificationCenter, didDeliver notification: NSUserNotification) {
if notification.isPresented {
if #available(OSX 10.13, *) {
// notification.isPresented is always false on the latest 10.13 beta.
installTimer()
} else {
if notification.isPresented {
// Alert is showing to user. Watch to see if it's dismissed.
installTimer()
} else {
} else {
// Alert wasn't shown to user. Fail.
complete(false)
}
}
}

Expand Down

0 comments on commit a2cdc5a

Please sign in to comment.