From 5ae28e22e3dee4226654345d7a3f3de45eb817c4 Mon Sep 17 00:00:00 2001 From: JanuarySnow <85711747+JanuarySnow@users.noreply.github.com> Date: Sun, 16 Jul 2023 22:22:24 +0100 Subject: [PATCH] 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 --- CHANGELOG.md | 2 +- Wabbajack.App.Wpf/View Models/Installers/InstallerVM.cs | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61e52708..a2825d20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/Wabbajack.App.Wpf/View Models/Installers/InstallerVM.cs b/Wabbajack.App.Wpf/View Models/Installers/InstallerVM.cs index da345b95..c21d9a42 100644 --- a/Wabbajack.App.Wpf/View Models/Installers/InstallerVM.cs +++ b/Wabbajack.App.Wpf/View Models/Installers/InstallerVM.cs @@ -218,7 +218,7 @@ public class InstallerVM : BackNavigatingVM, IBackNavigatingVM, ICpuStatusVM }); MessageBus.Current.Listen() - .Subscribe(msg => LoadModlist(msg.Path, msg.Metadata).FireAndForget()) + .Subscribe(msg => LoadModlistFromGallery(msg.Path, msg.Metadata).FireAndForget()) .DisposeWith(CompositeDisposable); MessageBus.Current.Listen() @@ -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();