//インフィニットスクロール 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 override Task <CommunityList> GetAllCommunities(Empty e, ServerCallContext context) { CommunityList communityList = new CommunityList(); var q = from x in db.Communities orderby x.Id ascending select x; foreach (var community in q) { communityList.Communities.Add(community); } return(Task.FromResult(communityList)); }
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 = ""; }