Ejemplo n.º 1
0
        protected override async Task RefreshList()
        {
            try
            {
                //IsLoading = true;
                RaiseStartRefreshList();

                Items.Clear();
                var list = await GroupAPI.GetExtendedAsync(VKSession.Instance.UserId);

                if (list == null)
                {
                    return;
                }

                var listFilter =
                    list.Items.Where(x => x.Type == VKGroup.TypeEnum.Page || x.Type == VKGroup.TypeEnum.Group);
                foreach (var item in listFilter)
                {
                    Items.Add(new VCAListItem <VKGroup>(item));
                }
            }
            catch (NullReferenceException)
            {
            }
            finally
            {
/*
 *              IsLoading = false;
 */
                RaiseFinishRefreshList();
            }
        }
Ejemplo n.º 2
0
        public async void RefreshList()
        {
            try
            {
                IsLoading = true;
                if (OnStartRefreshPlayList != null)
                {
                    OnStartRefreshPlayList(this, new EventArgs());
                }

                Items.Clear();
                var list = await GroupAPI.GetExtendedAsync(VKSession.Instance.UserId);

                if (list == null)
                {
                    return;
                }

                var listFilter =
                    list.Items.Where(x => x.Type == VKGroup.TypeEnum.Page || x.Type == VKGroup.TypeEnum.Group);
                foreach (var item in listFilter)
                {
                    Items.Add(item);
                }
            }
            catch (NullReferenceException)
            {
            }
            finally
            {
                IsLoading = false;

                if (OnFinishRefreshPlayList != null)
                {
                    OnFinishRefreshPlayList(this, new EventArgs());
                }
            }
        }
Ejemplo n.º 3
0
        protected override async Task <IEnumerable <VKGroup> > RefreshCore()
        {
            var list = await GroupAPI.GetExtendedAsync(VKSession.Instance.UserId);

            return(list.Items);
        }