private async Task loadDiscussions() { Discussions.Clear(); var payload = new DiscussionPayload(CurrentTag.Name, "10"); payload.Type = category; var result = await repository.LoadDiscussions(payload); if (result.StatusCode == System.Net.HttpStatusCode.OK) { foreach (var discussion in result.Data) { Discussions.Add(discussion); } } }
private async void SegmentChanged(int index) { category = (DiscussionCategory)index; Discussions.Clear(); await loadDiscussions(); }