[ios] fix terms dialog on first launch

This commit is contained in:
Aleksey Belousov 2018-06-04 19:38:47 +03:00 committed by yoksnod
parent 5374c7ff5b
commit 59798cfb1f
2 changed files with 3 additions and 8 deletions

View file

@ -243,7 +243,7 @@ BOOL gIsFirstMyPositionMode = YES;
[self updateStatusBarStyle];
GetFramework().InvalidateRendering();
[self showWelcomeScreenIfNeeded];
[self.welcomePageController show];
[self showViralAlertIfNeeded];
[self checkAuthorization];
}
@ -254,6 +254,7 @@ BOOL gIsFirstMyPositionMode = YES;
self.view.clipsToBounds = YES;
[self processMyPositionStateModeEvent:MWMMyPositionModePendingPosition];
[MWMKeyboard addObserver:self];
self.welcomePageController = [MWMWelcomePageController controllerWithParent:self];
}
- (void)mwm_refreshUI
@ -264,11 +265,6 @@ BOOL gIsFirstMyPositionMode = YES;
[self.downloadDialog mwm_refreshUI];
}
- (void)showWelcomeScreenIfNeeded
{
self.welcomePageController = [MWMWelcomePageController controllerWithParent:self];
}
- (void)closePageController:(MWMWelcomePageController *)pageController
{
if ([pageController isEqual:self.welcomePageController])

View file

@ -61,7 +61,6 @@ final class WelcomePageController: UIPageViewController {
controller.delegate = vc
}
vc.controllers = controllersToShow
vc.show()
return vc
}
@ -101,7 +100,7 @@ final class WelcomePageController: UIPageViewController {
MWMFrameworkHelper.processFirstLaunch()
}
func show() {
@objc func show() {
if let controller = currentController as? WelcomeViewController {
Statistics.logEvent(kStatEventName(kStatWhatsNew, type(of: controller).key),
withParameters: [kStatAction: kStatOpen])