Skip to content

Commit

Permalink
fix unable to update status of anime with unknown total episodes.
Browse files Browse the repository at this point in the history
  • Loading branch information
insomniachi committed Sep 3, 2022
1 parent 9b57517 commit b216d0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AnimDL.WinUI/Dialogs/ViewModels/UpdateAnimeStatusViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ public UpdateAnimeStatusViewModel()
{
this.ObservableForProperty(x => x.Anime, x => x)
.WhereNotNull()
.Subscribe(x => TotalEpisodes = x.TotalEpisodes ?? 0);
.Subscribe(x => TotalEpisodes = x.TotalEpisodes == 0 ? double.MaxValue : x.TotalEpisodes.Value);

this.WhenAnyValue(x => x.Anime)
this.ObservableForProperty(x => x.Anime, x => x)
.WhereNotNull()
.Select(x => x.Tracking)
.WhereNotNull()
Expand Down

0 comments on commit b216d0d

Please sign in to comment.