Skip to content

Commit

Permalink
推荐页错误捕获
Browse files Browse the repository at this point in the history
  • Loading branch information
ywmoyue committed Jun 12, 2024
1 parent 07e72db commit 0e01770
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/BiliLite.UWP/ViewModels/Home/RecommendPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,23 @@ public RecommendPageViewModel()

private async void LoadMore()
{
if (Items == null || Items.Count == 0)
try
{
return;
if (Items == null || Items.Count == 0)
{
return;
}
if (Loading)
{
return;
}
await GetRecommend(Items.LastOrDefault().Idx);
}
if (Loading)
catch (Exception ex)
{
return;
_logger.Error(ex.Message, ex);
Notify.ShowMessageToast(ex.Message);
}
await GetRecommend(Items.LastOrDefault().Idx);
}

private void LoadBanner(RecommendItemModel banner)
Expand Down

0 comments on commit 0e01770

Please sign in to comment.