Fix readme opening twice after pressing install button from gallery view (#2365)

* wraps loadmodlist into a new method when prompted from gallery view, so that it dosnt run loadmodlist twice when the listener for path changes fires it a second time, instead keep the listener as the only trigger for loadmodlist() as that is fired from sources other than the gallery play button

* remove commented code

* update changelog

---------

Co-authored-by: Timothy Baldridge <tbaldridge@gmail.com>
This commit is contained in:
JanuarySnow 2023-07-16 22:22:24 +01:00 committed by GitHub
parent 2e5d91f46d
commit 5ae28e22e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -3,9 +3,9 @@
#### Version TBD
* Fixed issues related to high RAM usage
* The resumable downloads now reserve drive space to write to in advance instead of being managed in system RAM
* Fixed readme double opening when modlist details are prepoulated
* Added a check if Downloadpath is alongside Wabbajack.exe location, to match the install path check that already exists
* Added check for identical download and install paths
* Fixed No Delete and NoDelete being handled by stripping whitespace before the regex, to idiotproof things a bit
#### Version - 3.1.0.0 - 5/7/2023

View File

@ -218,7 +218,7 @@ public class InstallerVM : BackNavigatingVM, IBackNavigatingVM, ICpuStatusVM
});
MessageBus.Current.Listen<LoadModlistForInstalling>()
.Subscribe(msg => LoadModlist(msg.Path, msg.Metadata).FireAndForget())
.Subscribe(msg => LoadModlistFromGallery(msg.Path, msg.Metadata).FireAndForget())
.DisposeWith(CompositeDisposable);
MessageBus.Current.Listen<LoadLastLoadedModlist>()
@ -324,6 +324,12 @@ public class InstallerVM : BackNavigatingVM, IBackNavigatingVM, ICpuStatusVM
}
}
private async Task LoadModlistFromGallery(AbsolutePath path, ModlistMetadata metadata)
{
ModListLocation.TargetPath = path;
ModlistMetadata = metadata;
}
private async Task LoadModlist(AbsolutePath path, ModlistMetadata? metadata)
{
using var ll = LoadingLock.WithLoading();