File tree Expand file tree Collapse file tree
UI/TabBarControllers/Profile Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -151,6 +151,7 @@ extern NSString *const kNewsFeedStoryBoardKey;
151151 * Otherwise, post a "APCUserForgotPasscodeNotification" notification and the alert will be shown for you
152152 */
153153- (void ) resetAppAndProceedToSignIn ;
154+ - (void ) resetAppAndProceedToOnboarding ;
154155
155156- (void ) clearPreviousUserData ;
156157
Original file line number Diff line number Diff line change @@ -758,13 +758,12 @@ - (void) logOutNotification: (NSNotification*) __unused notification
758758 [self .tasksReminder updateTasksReminder ];
759759}
760760
761- - (void ) logOutAndGoToSignIn
761+ - (void )logoutData
762762{
763763 self.dataSubstrate .currentUser .signedUp = NO ;
764764 self.dataSubstrate .currentUser .signedIn = NO ;
765765 [APCKeychainStore removeValueForKey: kPasswordKey ];
766766 [self .tasksReminder updateTasksReminder ];
767- [self showOnBoardingAndThenSignIn ];
768767}
769768
770769- (void ) showOnBoardingAndThenSignIn
@@ -1240,7 +1239,21 @@ - (void) showResetPasscodeAlert:(__unused NSNotification*)notification
12401239
12411240#pragma mark - Reset Methods
12421241
1242+ - (void ) resetAppAndProceedToOnboarding
1243+ {
1244+ [self clearUserInfo ];
1245+ [self logoutData ];
1246+ [self showOnBoarding ];
1247+ }
1248+
12431249- (void ) resetAppAndProceedToSignIn
1250+ {
1251+ [self clearUserInfo ];
1252+ [self logoutData ];
1253+ [self showOnBoardingAndThenSignIn ];
1254+ }
1255+
1256+ - (void ) clearUserInfo
12441257{
12451258 APCAppDelegate * appDelegate = (APCAppDelegate*) [UIApplication sharedApplication ].delegate ;
12461259 UIViewController * vc = [[UIViewController alloc ] init ];
@@ -1250,8 +1263,6 @@ - (void) resetAppAndProceedToSignIn
12501263 // This is all that is needed to force the re-registration of the PIN
12511264 APCUser* user = [((id <APCOnboardingManagerProvider>)appDelegate) onboardingManager ].user ;
12521265 user.secondaryInfoSaved = NO ;
1253-
1254- [self logOutAndGoToSignIn ];
12551266}
12561267
12571268- (void ) clearPreviousUserData
Original file line number Diff line number Diff line change @@ -269,14 +269,19 @@ - (IBAction) submit: (id) __unused sender
269269 }
270270 else {
271271 [spinnerController dismissViewControllerAnimated: NO completion: ^{
272- APCWithdrawCompleteViewController *viewController = [[UIStoryboard storyboardWithName: @" APCProfile" bundle: [NSBundle appleCoreBundle ]] instantiateViewControllerWithIdentifier: @" APCWithdrawCompleteViewController" ];
273- UINavigationController *navController = [[UINavigationController alloc ] initWithRootViewController: viewController];
274- [weakSelf.navigationController presentViewController: navController animated: YES completion: nil ];
272+ [weakSelf showWithdrawCompleteViewController ];
275273 }];
276274 }
277275 }];
278276}
279277
278+ - (void ) showWithdrawCompleteViewController
279+ {
280+ APCWithdrawCompleteViewController *viewController = [[UIStoryboard storyboardWithName: @" APCProfile" bundle: [NSBundle appleCoreBundle ]] instantiateViewControllerWithIdentifier: @" APCWithdrawCompleteViewController" ];
281+ UINavigationController *navController = [[UINavigationController alloc ] initWithRootViewController: viewController];
282+ [self .navigationController presentViewController: navController animated: YES completion: nil ];
283+ }
284+
280285- (IBAction )cancel : (id ) __unused sender
281286{
282287 [self dismissViewControllerAnimated: YES completion: nil ];
You can’t perform that action at this time.
0 commit comments