🐛 修复 ASF 下载通知问题

This commit is contained in:
RMBGAME
2024-10-09 19:31:42 +08:00
parent bf3d6ad778
commit 5ab308bb9b
@@ -11,9 +11,16 @@ public partial class ArchiSteamFarmExePathSettingsPageViewModel : ViewModelBase
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);
}
});
}
}