diff options
Diffstat (limited to 'example/ios/iOS UI Test/iOS UI Test/SettingsViewController.m')
-rw-r--r-- | example/ios/iOS UI Test/iOS UI Test/SettingsViewController.m | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/example/ios/iOS UI Test/iOS UI Test/SettingsViewController.m b/example/ios/iOS UI Test/iOS UI Test/SettingsViewController.m index e2f0d2c5..d17b479a 100644 --- a/example/ios/iOS UI Test/iOS UI Test/SettingsViewController.m +++ b/example/ios/iOS UI Test/iOS UI Test/SettingsViewController.m @@ -13,6 +13,7 @@ NSString * const UsernameKey = @"username"; NSString * const PasswordKey = @"password"; NSString * const HostnameKey = @"hostname"; NSString * const FetchFullMessageKey = @"FetchFullMessageEnabled"; +NSString * const OAuthEnabledKey = @"OAuth2Enabled"; @implementation SettingsViewController @@ -21,6 +22,7 @@ NSString * const FetchFullMessageKey = @"FetchFullMessageEnabled"; [[FXKeychain defaultKeychain] setObject:self.passwordTextField.text ?: @"" forKey:PasswordKey]; [[NSUserDefaults standardUserDefaults] setObject:self.hostnameTextField.text ?: @"" forKey:HostnameKey]; [[NSUserDefaults standardUserDefaults] setBool:[self.fetchFullMessageSwitch isOn] forKey:FetchFullMessageKey]; + [[NSUserDefaults standardUserDefaults] setBool:[self.useOAuth2Switch isOn] forKey:OAuthEnabledKey]; [self.delegate settingsViewControllerFinished:self]; } @@ -33,6 +35,7 @@ NSString * const FetchFullMessageKey = @"FetchFullMessageEnabled"; self.passwordTextField.text = [[FXKeychain defaultKeychain] objectForKey:PasswordKey]; self.hostnameTextField.text = [[NSUserDefaults standardUserDefaults] stringForKey:HostnameKey]; self.fetchFullMessageSwitch.on = [[NSUserDefaults standardUserDefaults] boolForKey:FetchFullMessageKey]; + self.useOAuth2Switch.on = [[NSUserDefaults standardUserDefaults] boolForKey:OAuthEnabledKey]; } @end |