Skip to content

Commit

Permalink
🐛 修复 ASF 下载通知问题
Browse files Browse the repository at this point in the history
  • Loading branch information
rmbadmin committed Oct 9, 2024
1 parent bf3d6ad commit 5ab308b
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@ public ArchiSteamFarmExePathSettingsPageViewModel()
SelectProgramPath = ReactiveCommand.Create(ASFService.Current.SelectASFProgramLocationAsync);
DownloadASF = ReactiveCommand.Create(() =>
{
var progress = INotificationService.Instance.NotifyDownload(() => "开始下载 ASF ", NotificationType.NewVersion);
ASFService.Current.DownloadASFAsync(progress: progress);
Toast.Show(ToastIcon.Info, "等待后台下载文件", ToastLength.Short);
if (INotificationService.Instance.IsSupportNotifyDownload)
{
var progress = INotificationService.Instance.NotifyDownload(() => "开始下载 ASF ", NotificationType.NewVersion);
ASFService.Current.DownloadASFAsync(progress: progress);
Toast.Show(ToastIcon.Info, "等待后台下载文件", ToastLength.Short);
}
else
{
Toast.Show(ToastIcon.Error, "当前平台无法调用下载通知,请自行下载", ToastLength.Short);
}
});
}
}

0 comments on commit 5ab308b

Please sign in to comment.