Browse Source

neon: Fix stackoverflows crashing the whole app

pull/152/head
jld3103 2 years ago
parent
commit
d1fd57038d
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 2
      packages/neon/lib/src/apps/news/blocs/articles.dart
  2. 3
      packages/neon/lib/src/apps/news/blocs/news.dart

2
packages/neon/lib/src/apps/news/blocs/articles.dart

@ -59,8 +59,10 @@ class NewsArticlesBloc extends InteractiveBloc implements NewsArticlesBlocEvents
filterType.add(FilterType.all);
}
if (this is! NewsMainArticlesBloc) {
unawaited(refresh());
}
}
final NewsBloc _newsBloc;
final NewsAppSpecificOptions options;

3
packages/neon/lib/src/apps/news/blocs/news.dart

@ -48,7 +48,7 @@ class NewsBloc extends InteractiveBloc implements NewsBlocEvents, NewsBlocStates
}
});
unawaited(refresh());
unawaited(mainArticlesBloc.refresh());
}
@override
@ -75,6 +75,7 @@ class NewsBloc extends InteractiveBloc implements NewsBlocEvents, NewsBlocStates
unawaited(unreadCounter.close());
unawaited(articles.close());
unawaited(filterType.close());
mainArticlesBloc.dispose();
super.dispose();
}

Loading…
Cancel
Save