Esempio n. 1
0
 private void LocateUserIfNeeded()
 {
     if (_locateUser && !_isShowingTutorial)
     {
         AutomaticLocateMeAtPickup.Execute(null);
         _locateUser = false;
     }
 }
Esempio n. 2
0
        private void OnApplicationLifetimeChanged(object sender, MvxLifetimeEventArgs args)
        {
            if (args.LifetimeEvent == MvxLifetimeEvent.ActivatedFromDisk || args.LifetimeEvent == MvxLifetimeEvent.ActivatedFromMemory)
            {
                // since this is called before OnViewStarted and AutomaticLocateMe needs it, do it here, otherwise AutomaticLocateMe will be very slow
                _locationService.Start();

                var isInBookingMode = CurrentViewState == HomeViewModelState.ManualRidelinq ||
                                      CurrentViewState == HomeViewModelState.BookingStatus;

                if (!isInBookingMode)
                {
                    Task.Run(() => VerifyActiveOrder()).FireAndForget();
                }

                AutomaticLocateMeAtPickup.ExecuteIfPossible();
                CheckUnratedRide();
                CheckTermsAsync();
                CheckCreditCardExpiration().FireAndForget();
                AddressPicker.RefreshFilteredAddress();

                _metricsService.LogApplicationStartUp();
            }
        }