From 0fa3fc9e19eb79041a4e1e6e6dc2c36099f58e1f Mon Sep 17 00:00:00 2001 From: jliddev Date: Mon, 21 Sep 2020 23:34:30 -0500 Subject: [PATCH] Alpha/Beta version match bug. --- WowUp.WPF/Assets/changelog.json | 6 +++++- WowUp.WPF/Services/AddonService.cs | 9 +++++++-- WowUp.WPF/WowUp.WPF.csproj | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/WowUp.WPF/Assets/changelog.json b/WowUp.WPF/Assets/changelog.json index 085128b0..cae0abe6 100644 --- a/WowUp.WPF/Assets/changelog.json +++ b/WowUp.WPF/Assets/changelog.json @@ -1,5 +1,9 @@ { - "ChangeLogs": [ + "ChangeLogs": [ + { + "Version": "1.16.2", + "Description": "Fix an issue with Alpha/Beta addons not being properly selected." + }, { "Version": "1.16.1", "Description": "Default addon channel can now be set separately per World of Warcraft client.\nAddons can now be set to auto update by default per World of Warcraft client.\nAttempt to make updating safer with rollback ability.\nContext information added to the bottom screen bar.\nSmall indicator for auto updated addons.\nWhen closing WowUp maximized it should start back up maximized.\nUI updates.\nBug Fixes." diff --git a/WowUp.WPF/Services/AddonService.cs b/WowUp.WPF/Services/AddonService.cs index ce789a01..a94fe86c 100644 --- a/WowUp.WPF/Services/AddonService.cs +++ b/WowUp.WPF/Services/AddonService.cs @@ -193,9 +193,14 @@ namespace WowUp.WPF.Services private AddonSearchResultFile GetLatestFile(AddonSearchResult searchResult, AddonChannelType channelType) { + var exactMatch = searchResult.Files.FirstOrDefault(lf => lf.ChannelType == channelType); + if (exactMatch != null) + { + return exactMatch; + } + return searchResult.Files - .Where(lf => lf.ChannelType <= channelType) - .FirstOrDefault(); + .FirstOrDefault(lf => lf.ChannelType <= channelType); } public async Task GetAddonByUri( diff --git a/WowUp.WPF/WowUp.WPF.csproj b/WowUp.WPF/WowUp.WPF.csproj index b961ff1c..187fa99a 100644 --- a/WowUp.WPF/WowUp.WPF.csproj +++ b/WowUp.WPF/WowUp.WPF.csproj @@ -10,7 +10,7 @@ WowUp Jliddev WowUp - 1.16.1 + 1.16.2 wowup_logo_512np_RRT_icon.ico jliddev https://wowup.io