//インフィニットスクロール public void NextPage() { if (IsEnd) { return; } IsActive = true; Owner.Status = "お気に入りコミュニティを取得中"; Task.Run(() => { var users = FavoriteInstance.GetFavoriteCommunity(); if (users == null) { IsEnd = true; IsActive = false; Owner.Status = ""; return; } foreach (var entry in users) { CommunityList.Add(entry); } IsActive = false; Owner.Status = ""; }); }
public async void GetPage() { Owner.Status = "フォローコミュニティを取得中"; var list = await FollowInstance.GetFollowedCommunityAsync(CurrentPage); if (list == null) { return; } CommunityList.Clear(); foreach (var entry in list) { CommunityList.Add(new FollowCommunityEntryViewModel(entry)); } IsActive = false; Owner.Status = ""; }