Example #1
0
        public async void InitDataAsync()
        {
            IsRunning = true;
            if (CrossConnectivity.Current.IsConnected)
            {
                TubeServices ser  = new TubeServices();
                var          data = await ser.GetAllTubes();

                AllTubes = data;
                if (AllTubes.Count == 0)
                {
                    MainVisable  = false;
                    VisableError = true;
                    ErrorValue   = Resource.NoBuildings;
                }
                else
                {
                    foreach (var item in data)
                    {
                        var x = await GetVideosDetailsAsync(item.key);

                        item.Youtube = x;
                    }
                    AllTubes = data;
                }
            }
            else
            {
                MainVisable  = false;
                VisableError = true;
                ErrorValue   = Resource.ErrorMessage;
            }
            IsRunning = false;
            //var videoIds = await GetVideoIdsFromChannelAsync();
        }