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(); } }
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()); } } }
protected override async Task <IEnumerable <VKGroup> > RefreshCore() { var list = await GroupAPI.GetExtendedAsync(VKSession.Instance.UserId); return(list.Items); }