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

Commit

Permalink
Merge pull request #21 from github/sierra-fix
Browse files Browse the repository at this point in the history
Hack to get things working on High Sierra
  • Loading branch information
mastahyeti authored Jul 26, 2017
2 parents 736a9fa + a2cdc5a commit 65f5d89
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 65f5d89

Please sign in to comment.