//load comment for entry protected async void tryLoadContent() { //set the current page details & reformate details newsTitleTB.Text = story.title; newsDateTB.Text = reformatString(story.date, "\n"); newsPubliserTb.Text = "Publisher: " + reformatString(story.by, "\n"); newsUrlTb.Text = "Url: " + reformatString(story.url, "\n"); newsScoreTb.Text = reformatString(story._lscore, "\n"); //Show loading ProgressRing progressRing1 = new ProgressRing(); progressRing1.IsActive = true; loaderRing.Children.Add(progressRing1); //load sub comments HNewsItemModel tmpHns; int iCnt = 0;//@todo: This should be a setting param foreach (string id in story.kids) { progressRing1.IsActive = false; tmpHns = await hnApiCli.getStoryById(id); comments.Add( tmpHns ); //Load 100 articles only if (++iCnt == 100) { break; } } }
public async void tryLoadContent() { //Show loading ProgressRing progressRing1 = new ProgressRing(); progressRing1.IsActive = true; loaderRing.Children.Add(progressRing1); string[] hnTopIds = await hnApiCli.getTopStoriesIdList(); HNewsItemModel tmpHns; int iCnt = 0;//@todo: This should be a setting param foreach (string id in hnTopIds) { //@todo: Should be moved progressRing1.IsActive = false; tmpHns = await hnApiCli.getStoryById(id); news.Add( tmpHns ); //Load 100 articles only if (++iCnt == 100) { break; } } }