Skip to content

Commit

Permalink
Merge branch 'master' into widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
niekvandepas committed Apr 3, 2024
2 parents 930bd57 + b52ab45 commit 5acbcad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Focal iOS/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ class SceneDelegate: NSObject, UIWindowSceneDelegate {
}

func sceneWillEnterForeground(_ scene: UIScene) {
correctSuspendedTimerState()
}

func correctSuspendedTimerState() {
guard timerViewModel.timerIsRunning else { return }
if let resignationTime = lastTimeWhenFocalResignedActive {
let timeDifferenceBetweenResignationAndActivation = Date().timeIntervalSince(resignationTime)
let correctedTimeRemaining =
Expand Down

0 comments on commit 5acbcad

Please sign in to comment.