comments bug fixed
This commit is contained in:
parent
aba3d69dab
commit
0ce465e3cb
|
|
@ -84,7 +84,7 @@ class NewsDetailsState extends CoreProvier {
|
||||||
news.any((n) => newsItem != null && n != null && n.id == newsItem.id);
|
news.any((n) => newsItem != null && n != null && n.id == newsItem.id);
|
||||||
|
|
||||||
void onCommentsChanged(int count) {
|
void onCommentsChanged(int count) {
|
||||||
news.firstWhere((item) => item!.id == currentNews.id)!.comments = count;
|
news.firstWhere((item) => item?.id == currentNews.id)!.comments = count;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ class RadarDetailsState extends CoreProvier {
|
||||||
radars.any((r) => radar != null && r != null && r.id == radar.id);
|
radars.any((r) => radar != null && r != null && r.id == radar.id);
|
||||||
|
|
||||||
void onCommentsChanged(int count) {
|
void onCommentsChanged(int count) {
|
||||||
radars.firstWhere((radar) => radar!.id == currentRadar.id)!.comments =
|
radars.firstWhere((radar) => radar?.id == currentRadar.id)!.comments =
|
||||||
count;
|
count;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue