Skip to content

Commit 0d2090b

Browse files
committed
🐛 fix: 修复 CheckForUpdatesAsync 未保存 UpdateInfo 导致下载失败
- CheckForUpdatesAsync 现在将返回的 UpdateInfo 保存到 _updateInfo 字段 - 修复 DownloadUpdatesAsync 抛出 "UpdateInfo is not initialized" 异常的问题
1 parent c9f4cba commit 0d2090b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Services/UpdateService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ public async Task InitializeAsync()
2525
{
2626
if (_updateManager == null) await InitializeAsync();
2727

28-
return await _updateManager!.CheckForUpdatesAsync();
28+
_updateInfo = await _updateManager!.CheckForUpdatesAsync();
29+
return _updateInfo;
2930
}
3031

3132
public async Task DownloadUpdatesAsync(Action<int> progress, CancellationToken cancellationToken = default)

0 commit comments

Comments
 (0)