Exemple #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);
            }
        }
Exemple #2
0
        private void MarketChanged(MarketSettings marketSettings)
        {
            // Market changed and not home market
            if (_lastHashedMarket != marketSettings.HashedMarket &&
                !marketSettings.IsLocalMarket &&
                !Settings.Network.HideMarketChangeWarning)
            {
                this.Services().Message.ShowMessage(this.Services().Localize["MarketChangedMessageTitle"],
                                                    this.Services().Localize["MarketChangedMessage"]);
            }

            _lastHashedMarket = marketSettings.HashedMarket;

            if (BookingStatus != null && BookingStatus.BottomBar != null)
            {
                BookingStatus.BottomBar.DisableOutOfAppPayment = marketSettings.DisableOutOfAppPayment;
            }

            if (BottomBar != null)
            {
                BottomBar.CheckManualRideLinqEnabledAsync();
            }
        }