Esempio n. 1
0
        public override void OnViewStarted(bool firstTime)
        {
            base.OnViewStarted(firstTime);

            try
            {
                _firstTime = firstTime;

                _locationService.Start();

                if (_orderWorkflowService.IsOrderRebooked())
                {
                    _bottomBar.ReviewOrderDetails().FireAndForget();
                }

                if (firstTime)
                {
                    Panel.Start().FireAndForget();

                    AddressPicker.RefreshFilteredAddress();

                    this.Services().ApplicationInfo.CheckVersionAsync().FireAndForget();

                    CheckTermsAsync();

                    CheckCreditCardExpiration().FireAndForget();

                    BottomBar.CheckManualRideLinqEnabledAsync();

                    _isShowingTutorial = _tutorialService.DisplayTutorialToNewUser(() =>
                    {
                        _isShowingTutorial = false;
                        LocateUserIfNeeded();
                    });
                    _pushNotificationService.RegisterDeviceForPushNotifications(force: true);
                }

                LocateUserIfNeeded();

                if (_defaultHintZoomLevel != null)
                {
                    ChangePresentation(_defaultHintZoomLevel);
                    _defaultHintZoomLevel = null;
                }

                _vehicleService.Start();
            }
            catch (Exception ex)
            {
                Logger.LogError(ex);
            }
        }