public override async void OnNavigatedTo(INavigationParameters parameters) { _loggerService.StartMethod(); base.OnNavigatedTo(parameters); await _migrationService.MigrateAsync(); Destination destination = Destination.HomePage; if (parameters.ContainsKey(SplashPage.DestinationKey)) { destination = parameters.GetValue <Destination>(SplashPage.DestinationKey); } _loggerService.Info($"Destination is set {destination}"); _splashNavigatoinService.Destination = destination; _splashNavigatoinService.DestinationPageParameters = parameters; await _splashNavigatoinService.Prepare(); await _splashNavigatoinService.NavigateNextAsync(); _loggerService.EndMethod(); }
public override Result DoWork() { _loggerService.StartMethod(); Task.Run(() => _migrationService.MigrateAsync()).GetAwaiter().GetResult(); _loggerService.EndMethod(); return(Result.InvokeSuccess()); }
public override async void OnNavigatedTo(INavigationParameters parameters) { _loggerService.StartMethod(); base.OnNavigatedTo(parameters); await _migrationService.MigrateAsync(); var destination = Destination.HomePage; if (parameters.ContainsKey(SplashPage.DestinationKey)) { _loggerService.Info($"Destination is set {destination}"); destination = parameters.GetValue <Destination>(SplashPage.DestinationKey); } if (_userDataRepository.IsAllAgreed()) { _loggerService.Info("User data exists"); var termsUpdateInfo = await _termsUpdateService.GetTermsUpdateInfo(); if (_termsUpdateService.IsUpdated(TermsType.TermsOfService, termsUpdateInfo)) { _loggerService.Info($"Transition to ReAgreeTermsOfServicePage"); var navigationParams = ReAgreeTermsOfServicePage.BuildNavigationParams(termsUpdateInfo, destination, parameters); _ = await NavigationService.NavigateAsync("/" + nameof(ReAgreeTermsOfServicePage), navigationParams); } else if (_termsUpdateService.IsUpdated(TermsType.PrivacyPolicy, termsUpdateInfo)) { _loggerService.Info($"Transition to ReAgreePrivacyPolicyPage"); var navigationParams = ReAgreePrivacyPolicyPage.BuildNavigationParams(termsUpdateInfo.PrivacyPolicy, destination, parameters); _ = await NavigationService.NavigateAsync("/" + nameof(ReAgreePrivacyPolicyPage), navigationParams); } else { _loggerService.Info($"Transition to {destination}"); _ = await NavigationService.NavigateAsync(destination.ToPath(), parameters); } } else { _loggerService.Info("No user data exists"); _loggerService.Info($"Transition to TutorialPage1"); _ = await NavigationService.NavigateAsync("/" + nameof(TutorialPage1)); } _loggerService.EndMethod(); }