public bool Track() { if (_applicationRepository.IsFirstTimeUserExperienceCompleted()) { return(true); } RestoreIfttt(); if (_locationRepository.IsHomeLocationSet() && _credentialsRepository.HasAny() && _actionRepository.HasAny()) { _applicationRepository.UpdateFirstTimeUserExperience(isCompleted: true); return(true); } else { return(false); } }
private async Task UpdateFirstTimeUserExperience() { IsFirstTimeUserExperience = !_applicationRepository.IsFirstTimeUserExperienceCompleted(); if (!IsFirstTimeUserExperience) { return; } IsFirstTimeUserExperience = !_firstTimeUserExperienceTracker.Track(); if (!_applicationRepository.GetIsEnabled()) { IsLoading = true; await _functionalityToggler.On(typeof(GeofenceBackgroundTask).FullName); IsLoading = false; } await DispatcherHelper.RunAsync(() => { IsFirstTimeUserExperienceHomeStep = (!_locationRepository.IsHomeLocationSet()); IsFirstTimeUserExperienceServicesStep = (!IsFirstTimeUserExperienceHomeStep && !_credentialsRepository.HasAny()); IsFirstTimeUserExperienceTasksStep = (!IsFirstTimeUserExperienceHomeStep && !IsFirstTimeUserExperienceServicesStep && !_actionRepository.HasAny()); }); }