Show readme before/after install

This commit is contained in:
Timothy Baldridge 2021-11-09 17:06:19 -07:00
parent 6253f3d2ee
commit 3d92b44f9f

View File

@ -198,9 +198,16 @@ public class StandardInstallationViewModel : ViewModelBase
_logger.LogInformation("Installer created, starting the installation process"); _logger.LogInformation("Installer created, starting the installation process");
try try
{ {
if (!string.IsNullOrWhiteSpace(_config.ModList.Readme))
OSUtil.OpenWebsite(new Uri(_config.ModList.Readme));
var result = await Task.Run(async () => await _installer.Begin(CancellationToken.None)); var result = await Task.Run(async () => await _installer.Begin(CancellationToken.None));
if (!result) throw new Exception("Installation failed"); if (!result) throw new Exception("Installation failed");
if (!string.IsNullOrWhiteSpace(_config.ModList.Readme))
OSUtil.OpenWebsite(new Uri(_config.ModList.Readme));
if (result) await SaveConfigAndContinue(_config); if (result) await SaveConfigAndContinue(_config);
} }
catch (Exception ex) catch (Exception ex)
@ -219,6 +226,7 @@ public class StandardInstallationViewModel : ViewModelBase
await image.CopyToAsync(os); await image.CopyToAsync(os);
} }
await _installStateManager.SetLastState(new InstallationConfigurationSetting await _installStateManager.SetLastState(new InstallationConfigurationSetting
{ {
Downloads = config.Downloads, Downloads = config.Downloads,