Skip to content

Commit

Permalink
fix typo and add some future functionality TODOS
Browse files Browse the repository at this point in the history
  • Loading branch information
erikng committed Feb 23, 2022
1 parent 3301024 commit aa7f690
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions Nudge/UI/Main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,26 @@ class AppDelegate: NSObject, NSApplicationDelegate {
return true
}

func applicationDidResignActive(_ notification: Notification) {
// TODO: This function can be used to force nudge right back in front
// NSApp.activate(ignoringOtherApps: true)
}

func applicationWillResignActive(_ notification: Notification) {
// TODO: This function can be used to force nudge right back in front
// NSApp.activate(ignoringOtherApps: true)
}

func applicationWillBecomeActive(_ notification: Notification) {
// TODO: Perhaps move some of the ContentView logic into this - Ex: updateUI()
// NSApp.deactivate()
}

func applicationDidBecomeActive(_ notification: Notification) {
// TODO: Perhaps move some of the ContentView logic into this - Ex: centering UI, full screen
// NSApp.deactivate()
}

func applicationDidFinishLaunching(_ notification: Notification) {
// Listen for keyboard events
NSEvent.addLocalMonitorForEvents(matching: .keyDown) {
Expand Down
2 changes: 1 addition & 1 deletion Nudge/Utilities/UILogic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func needToActivateNudge() -> Bool {
let currentTime = Date().timeIntervalSince1970
let timeDiff = Int((currentTime - nudgePrimaryState.lastRefreshTime.timeIntervalSince1970))

// The first time the main timer contoller hits we don't care
// The first time the main timer controller hits we don't care
if !nudgeLogState.afterFirstRun {
let msg = "Initializing nudgeRefreshCycle: \(nudgeRefreshCycle)"
uiLog.info("\(msg, privacy: .public)")
Expand Down

0 comments on commit aa7f690

Please sign in to comment.