Skip to content

Commit

Permalink
Run intruded event if wake without unlock
Browse files Browse the repository at this point in the history
  • Loading branch information
ts1 committed Mar 3, 2024
1 parent 33bbe3e commit c33a132
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions BLEUnlock/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate, NSMenuItemVa

@objc func onDisplayWake() {
print("display wake")
unlockedAt = Date().timeIntervalSince1970
//unlockedAt = Date().timeIntervalSince1970
displaySleep = false
wakeTimer?.invalidate()
wakeTimer = nil
Expand Down Expand Up @@ -343,7 +343,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate, NSMenuItemVa
Timer.scheduledTimer(withTimeInterval: 2, repeats: false, block: { _ in
print("onUnlock")
if Date().timeIntervalSince1970 >= self.unlockedAt + 10 {
if self.ble.unlockRSSI != self.ble.UNLOCK_DISABLED && !self.prefs.bool(forKey: "wakeWithoutUnlocking") {
if self.ble.unlockRSSI != self.ble.UNLOCK_DISABLED {
self.runScript("intruded")
}
self.playNowPlaying()
Expand Down
4 changes: 2 additions & 2 deletions BLEUnlock/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.12.1</string>
<string>1.12.2</string>
<key>CFBundleVersion</key>
<string>778</string>
<string>796</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down

0 comments on commit c33a132

Please sign in to comment.