Skip to content

Commit

Permalink
Fix for update
Browse files Browse the repository at this point in the history
  • Loading branch information
SirSparkles committed Jul 23, 2019
1 parent 5a0d736 commit 78a51ff
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions GetReviews/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,22 @@ private async void Button_Click(object sender, RoutedEventArgs e)

(ConcurrentBag<DlQuestion> allQuestions, ConcurrentBag<DlReview> allReviews) = await ReloadAsync(Name,tbAccount.Text).ConfigureAwait(false);

DlQuestions questions = (DlQuestions)Resources["Questions"];
questions.Clear();
foreach (DlQuestion x in allQuestions)
await Dispatcher.InvokeAsync(() =>
{
questions.Add(x);
}
DlQuestions questions = (DlQuestions) Resources["Questions"];
questions.Clear();
foreach (DlQuestion x in allQuestions)
{
questions.Add(x);
}

DlReviews reviews = (DlReviews)Resources["Reviews"];
reviews.Clear();
foreach (DlReview x in allReviews)
{
reviews.Add(x);
}
DlReviews reviews = (DlReviews) Resources["Reviews"];
reviews.Clear();
foreach (DlReview x in allReviews)
{
reviews.Add(x);
}
});
}

private async Task<(ConcurrentBag<DlQuestion>, ConcurrentBag<DlReview>)> ReloadAsync(string appName,string username)
Expand Down

0 comments on commit 78a51ff

Please sign in to comment.