Clean up the installer page a bit, create a settings folder if it doesn't exist

This commit is contained in:
Timothy Baldridge 2021-10-18 16:24:36 -06:00
parent 4d2df7fa21
commit 514ffd4c06
4 changed files with 5 additions and 2 deletions

View File

@ -8,6 +8,7 @@ using ReactiveUI;
using Wabbajack.App.Messages;
using Wabbajack.App.ViewModels;
using Wabbajack.Paths;
using Wabbajack.Paths.IO;
using Wabbajack.Services.OSIntegrated.TokenProviders;
namespace Wabbajack.App.Screens
@ -30,6 +31,7 @@ namespace Wabbajack.App.Screens
this.WhenActivated(disposables =>
{
configuration.EncryptedDataLocation.CreateDirectory();
Watcher = new FileSystemWatcher(configuration.EncryptedDataLocation.ToString());
Watcher.DisposeWith(disposables);
Watcher.Created += Pulse;

View File

@ -84,6 +84,7 @@ namespace Wabbajack.App.ViewModels
var settings = this.WhenAnyValue(t => t.ModListPath)
.SelectAsync(disposables, async v => await _stateManager.Get(v))
.ObserveOn(RxApp.MainThreadScheduler)
.Where(s => s != null);
settings.Select(s => s!.Install)

View File

@ -89,7 +89,7 @@ namespace Wabbajack.Installer
if (OnStatusUpdate != null)
{
OnStatusUpdate(this, new StatusUpdate(statusText, Percent.FactoryPutInRange(_currentStep, MaxSteps),
OnStatusUpdate(this, new StatusUpdate($"[{_currentStep}/{MaxSteps}] " + statusText, Percent.FactoryPutInRange(_currentStep, MaxSteps),
Percent.Zero));
}
}

View File

@ -38,7 +38,7 @@ namespace Wabbajack.Installer
base(logger, config, gameLocator, extractor, jsonSerializer, vfs, fileHashCache, downloadDispatcher,
parallelOptions, wjClient)
{
MaxSteps = 20;
MaxSteps = 6;
}