From 76769d115b477ef6436f1ea536a8fe0a23fa438c Mon Sep 17 00:00:00 2001 From: jliddev Date: Thu, 23 Jul 2020 10:35:05 -0500 Subject: [PATCH] v1.12.2 When an unknown client is detected, add the preference on the fly --- WowUp.WPF/Assets/changelog.json | 4 ++++ WowUp.WPF/Services/WarcraftService.cs | 10 +++++++++- WowUp.WPF/WowUp.WPF.csproj | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/WowUp.WPF/Assets/changelog.json b/WowUp.WPF/Assets/changelog.json index c3115239..a5c644c6 100644 --- a/WowUp.WPF/Assets/changelog.json +++ b/WowUp.WPF/Assets/changelog.json @@ -1,5 +1,9 @@ { "ChangeLogs": [ + { + "Version": "1.12.2", + "Description": "Fix an issue with beta client crashing the app when detected." + }, { "Version": "1.12.1", "Description": "Attempt to fix issues with maxmizing the window going being the taskbar." diff --git a/WowUp.WPF/Services/WarcraftService.cs b/WowUp.WPF/Services/WarcraftService.cs index 81f5b8f0..b0a8d01f 100644 --- a/WowUp.WPF/Services/WarcraftService.cs +++ b/WowUp.WPF/Services/WarcraftService.cs @@ -73,14 +73,22 @@ namespace WowUp.WPF.Services var clientLocation = GetClientLocation(clientType); var productLocation = GetProductLocation(clientType); - if(AreEqualPaths(clientLocation, productLocation)) + Log.Information($"clientLocation {clientLocation}, productLocation: {productLocation}"); + if (AreEqualPaths(clientLocation, productLocation)) { continue; } var locationPreference = GetClientLocationPreference(clientType); + if(locationPreference == null) + { + locationPreference = _preferenceRepository.Create(GetClientLocationPreferenceKey(clientType), string.Empty); + } + locationPreference.Value = productLocation; + Log.Information($"locationPreference {locationPreference}"); + _preferenceRepository.SaveItem(locationPreference); var changedClient = new ChangedClient diff --git a/WowUp.WPF/WowUp.WPF.csproj b/WowUp.WPF/WowUp.WPF.csproj index 5ab753c4..8b40cca9 100644 --- a/WowUp.WPF/WowUp.WPF.csproj +++ b/WowUp.WPF/WowUp.WPF.csproj @@ -10,7 +10,7 @@ WowUp Jliddev WowUp - 1.12.1 + 1.12.2 wowup_logo_512np_RRT_icon.ico jliddev https://wowup.io