Skip to content

Commit

Permalink
🐛 fix first selected season.
Browse files Browse the repository at this point in the history
  • Loading branch information
iota9star committed Jun 23, 2021
1 parent 709ca15 commit 151cc91
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/providers/index_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ class IndexModel extends CancelableBaseModel {
if (index == null) return;
this._years = index.years;
this._subscribedModel.years = this._years;
this._selectedSeason = this._years.getOrNull(0)?.seasons.getOrNull(0);
this._selectedSeason = this
._years
.getOrNull(0)
?.seasons
.firstWhere((element) => element.active);
this._bangumiRows = index.bangumiRows;
this._selectedBangumiRow = this._bangumiRows[0];
this._carousels = index.carousels;
Expand Down

0 comments on commit 151cc91

Please sign in to comment.