Example #1
0
        public async Task <int> FetchCount()
        {
            var isAvailableRequest = await Syncronizer.Syncronizer.Current.IsAvailableRequest();

            if (!isAvailableRequest)
            {
                return(await _photoService.GetPhotoCount());
            }

            var countPhotoModel = await _restService.Request().GetCountPhoto();

            if (countPhotoModel == null)
            {
                return(0);
            }

            return(countPhotoModel.Photos);
        }