mirror of
https://github.com/AU-COVIDSafe/mobile-ios.git
synced 2025-04-19 04:55:19 +00:00
COVIDSafe code from version 1.9 (#18)
This commit is contained in:
parent
2257c542ed
commit
3b1d8fa3f4
41 changed files with 4217 additions and 3998 deletions
|
@ -36,7 +36,7 @@ class InitialScreenViewController: UIViewController, EncounterDBMigrationProgres
|
|||
continueAfterDelay(delay: displayTimeSeconds)
|
||||
// add give up action in case the keychain notification in not received after 8 seconds
|
||||
giveupTimer = Timer.scheduledTimer(withTimeInterval: giveupTimeSeconds, repeats: false) { timer in
|
||||
self.performSegue(withIdentifier: "initialPersonalDetailsSegue", sender: self)
|
||||
self.performSegue(withIdentifier: "initialScreenToIWantToHelpSegue", sender: self)
|
||||
}
|
||||
EncounterDB.shared.setup(migrationDelegate: self)
|
||||
}
|
||||
|
@ -72,13 +72,11 @@ class InitialScreenViewController: UIViewController, EncounterDBMigrationProgres
|
|||
migrationVc.dismiss(animated: true, completion: nil)
|
||||
}
|
||||
let isLoggedIn: Bool = (keychain.get("JWT_TOKEN") != nil)
|
||||
if !UserDefaults.standard.bool(forKey: "completedIWantToHelp") {
|
||||
if !UserDefaults.standard.bool(forKey: "completedIWantToHelp") ||
|
||||
!UserDefaults.standard.bool(forKey: "hasConsented") ||
|
||||
!isLoggedIn {
|
||||
keychain.delete("JWT_TOKEN")
|
||||
self.performSegue(withIdentifier: "initialScreenToIWantToHelpSegue", sender: self)
|
||||
} else if !UserDefaults.standard.bool(forKey: "hasConsented") {
|
||||
self.performSegue(withIdentifier: "initialScreenToConsentSegue", sender: self)
|
||||
} else if !isLoggedIn {
|
||||
self.performSegue(withIdentifier: "initialPersonalDetailsSegue", sender: self)
|
||||
} else if !UserDefaults.standard.bool(forKey: "allowedPermissions") {
|
||||
self.performSegue(withIdentifier: "initialScreenToAllowPermissionsSegue", sender: self)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue