Skip to content
Snippets Groups Projects
Commit 8d96568c authored by jakobsbode's avatar jakobsbode
Browse files

show skip button only in travel intro, if user traveled

parent 16779a17
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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")
......
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment