Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
insomniachi committed Jun 26, 2023
1 parent 041beca commit b0d32ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Totoro.Core/ViewModels/WatchViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,11 @@ public override async Task OnNavigatedTo(IReadOnlyDictionary<string, object> par
else if (parameters.ContainsKey("SearchResult"))
{
var searchResult = (ICatalogItem)parameters["SearchResult"];
if(searchResult is IHaveMalId ihmid && _settings.DefaultListService == ListServiceType.MyAnimeList)
if(searchResult is IHaveMalId { MalId: >0 } ihmid && _settings.DefaultListService == ListServiceType.MyAnimeList)
{
SetAnime(ihmid.MalId);
}
else if(searchResult is IHaveAnilistId ihaid && _settings.DefaultListService == ListServiceType.AniList)
else if(searchResult is IHaveAnilistId { AnilistId : >0 } ihaid && _settings.DefaultListService == ListServiceType.AniList)
{
SetAnime(ihaid.AnilistId);
}
Expand Down

0 comments on commit b0d32ea

Please sign in to comment.