Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #4783 from corona-warn-app/fix/13920-False-Screen-…
Browse files Browse the repository at this point in the history
…Color-when-checking-Mask-Rules-for-Recovery-Certificate-2

fix/13920 false screen color when checking mask rules for recovery certificate
  • Loading branch information
naveeddotio authored Sep 19, 2022
2 parents c3addf4 + c712d73 commit d7eb80c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, CoronaWarnAppDelegate, Re
Analytics.triggerAnalyticsSubmission()
appUpdateChecker.checkAppVersionDialog(for: window?.rootViewController)
healthCertificateService.updateValidityStatesAndNotifications(completion: { })
healthCertificateService.updateDCCWalletInfosIfNeeded()
}

func applicationWillTerminate(_ application: UIApplication) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,12 @@ class HealthCertifiedPerson: Codable, Equatable, Comparable {
}

var needsDCCWalletInfoUpdate: Bool {
let now = Date()

return dccWalletInfo == nil || mostRecentWalletInfoUpdateFailed || (dccWalletInfo?.validUntil ?? now) < now
guard let validUntil = dccWalletInfo?.validUntil else {
// should never happen
return true
}

return dccWalletInfo == nil || mostRecentWalletInfoUpdateFailed || validUntil < Date()
}

func healthCertificate(for reference: DCCCertificateReference) -> HealthCertificate? {
Expand Down

0 comments on commit d7eb80c

Please sign in to comment.