From 7b0965bc83c8ae3654d5053eac09d9fb632344e7 Mon Sep 17 00:00:00 2001 From: Chuan Ren Date: Wed, 6 Mar 2019 10:58:32 -0800 Subject: [PATCH] Auth picker view no refresh on getter --- Auth/FirebaseAuthUI/FUIAuth.m | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/Auth/FirebaseAuthUI/FUIAuth.m b/Auth/FirebaseAuthUI/FUIAuth.m index f4203ffbbb1..2c264a6bc83 100644 --- a/Auth/FirebaseAuthUI/FUIAuth.m +++ b/Auth/FirebaseAuthUI/FUIAuth.m @@ -126,16 +126,13 @@ - (BOOL)handleOpenURL:(NSURL *)URL - (UINavigationController *)authViewController { static UINavigationController *authViewController; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - UIViewController *controller; - if ([self.delegate respondsToSelector:@selector(authPickerViewControllerForAuthUI:)]) { - controller = [self.delegate authPickerViewControllerForAuthUI:self]; - } else { - controller = [[FUIAuthPickerViewController alloc] initWithAuthUI:self]; - } - authViewController = [[UINavigationController alloc] initWithRootViewController:controller]; - }); + UIViewController *controller; + if ([self.delegate respondsToSelector:@selector(authPickerViewControllerForAuthUI:)]) { + controller = [self.delegate authPickerViewControllerForAuthUI:self]; + } else { + controller = [[FUIAuthPickerViewController alloc] initWithAuthUI:self]; + } + authViewController = [[UINavigationController alloc] initWithRootViewController:controller]; return authViewController; }