diff --git a/enzevalos_iphone/IntroDescriptionViewController.swift b/enzevalos_iphone/IntroDescriptionViewController.swift index c99d42fea7d02069cbe09efa243678f519f3779b..e8e91391f43867cb6003b8a063c1dc54d14b626b 100644 --- a/enzevalos_iphone/IntroDescriptionViewController.swift +++ b/enzevalos_iphone/IntroDescriptionViewController.swift @@ -107,7 +107,7 @@ class IntroDescriptionViewController: UIViewController, IntroInfoButton { if doneAction != nil { self.navigationItem.setRightBarButton(UIBarButtonItem(title: doneText, style: .plain, target: self, action: #selector(doneTapped(_:))), animated: true) } - if skipAction == nil { + if skipAction == nil || !(UserManager.loadUserValue(.userTraveled) as? Bool ?? false) { skipButton.isHidden = true } else { skipButton.isHidden = false diff --git a/enzevalos_iphone/TravelHandler.swift b/enzevalos_iphone/TravelHandler.swift index 010c9f5f10ea8b528f1e53986378ac888c5f8d5e..5ebaca65b2b8f111cdfcd38fd5c6ba6775fe1bfb 100644 --- a/enzevalos_iphone/TravelHandler.swift +++ b/enzevalos_iphone/TravelHandler.swift @@ -476,6 +476,7 @@ public class TravelHandler { //TODO: errorhandling } describeSecretController.navigationController?.pushViewController(secretController, animated: true) + UserManager.storeUserValue(true as AnyObject, attribute: .userTraveled) } secretController.navigationItem.hidesBackButton = true secretController.doneText = NSLocalizedString("Next", comment: "present next ViewController") diff --git a/enzevalos_iphone/UserData.swift b/enzevalos_iphone/UserData.swift index ac07adc3e8c22c2423d8ccab52a3f1d04db665a3..76bb9ddebcb10062883f050d38bb41a89f02a8c9 100644 --- a/enzevalos_iphone/UserData.swift +++ b/enzevalos_iphone/UserData.swift @@ -22,7 +22,7 @@ import KeychainAccess enum Attribute: Int { - case accountname, userName, userAddr, userPW, smtpHostname, smtpPort, imapHostname, imapPort, prefEncryption, publicKey, autocryptType, imapConnectionType, imapAuthType, smtpConnectionType, smtpAuthType, sentFolderPath, draftFolderPath, trashFolderPath, inboxFolderPath, archiveFolderPath, nextDeadline/*used for Logging; determines the earliest next time a log is send to the researchers*/, prefSecretKeyID, subjectSalt /*used for Logging; salt for the hashfunction for mail subjects*/, loggingFolderPath + case accountname, userName, userAddr, userPW, smtpHostname, smtpPort, imapHostname, imapPort, prefEncryption, publicKey, autocryptType, imapConnectionType, imapAuthType, smtpConnectionType, smtpAuthType, sentFolderPath, draftFolderPath, trashFolderPath, inboxFolderPath, archiveFolderPath, nextDeadline/*used for Logging; determines the earliest next time a log is send to the researchers*/, prefSecretKeyID, subjectSalt /*used for Logging; salt for the hashfunction for mail subjects*/, loggingFolderPath, userTraveled var defaultValue: AnyObject? { switch self { @@ -44,6 +44,8 @@ enum Attribute: Int { return Date(timeIntervalSinceNow: TimeInterval(Logger.loggingInterval)) as AnyObject? case .loggingFolderPath: //save backendFolderPath here return "letterbox-study" as AnyObject? + case .userTraveled: + return false as AnyObject? default: return nil }