Skip to content

Commit

Permalink
Fix data view method
Browse files Browse the repository at this point in the history
  • Loading branch information
dewmal committed Mar 18, 2020
1 parent 0133c7c commit 775e0dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/networking/api_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ApiClient {
//
for (var i = startId; i <= endId; i++) {
NewsArticle article = await getMessage(i, forceUpdate: forceUpdate);
articles.add(article);
if (article != null) articles.add(article);
}

return articles;
Expand Down
2 changes: 1 addition & 1 deletion lib/notifiers/stories_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class StoriesModel extends ChangeNotifier {

void add(NewsArticle article) {
if (!_articles.contains(article)) {
_articles.add(article);
_articles.insert(0, article);
notifyListeners();
}
}
Expand Down

0 comments on commit 775e0dd

Please sign in to comment.