From 78e6c7ce30ab7bfa2f8f1f958af8b70a2e2d468b Mon Sep 17 00:00:00 2001 From: Xathz Date: Mon, 28 Sep 2020 17:07:56 -0400 Subject: [PATCH 1/9] Add open folder in addon context menu Note I had to add System.ComponentModel.Annotations from nuget for it to build --- WowUp.Common/WowUp.Common.csproj | 1 + WowUp.WPF/Extensions/AddonExtensions.cs | 3 +++ WowUp.WPF/Utilities/FileUtilities.cs | 7 +++++++ WowUp.WPF/Utilities/OperatingSystem.cs | 10 ++++++++++ WowUp.WPF/ViewModels/AddonListItemViewModel.cs | 8 +++++++- WowUp.WPF/Views/AddonsView.xaml | 3 +++ 6 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 WowUp.WPF/Utilities/OperatingSystem.cs diff --git a/WowUp.Common/WowUp.Common.csproj b/WowUp.Common/WowUp.Common.csproj index f1f2d8f6..489d83cc 100644 --- a/WowUp.Common/WowUp.Common.csproj +++ b/WowUp.Common/WowUp.Common.csproj @@ -7,6 +7,7 @@ + diff --git a/WowUp.WPF/Extensions/AddonExtensions.cs b/WowUp.WPF/Extensions/AddonExtensions.cs index b04c95fa..171641e1 100644 --- a/WowUp.WPF/Extensions/AddonExtensions.cs +++ b/WowUp.WPF/Extensions/AddonExtensions.cs @@ -3,6 +3,7 @@ using System.IO; using System.Linq; using WowUp.Common.Enums; using WowUp.WPF.Entities; +using WowUp.WPF.Services.Contracts; using WowUp.WPF.Utilities; namespace WowUp.WPF.Extensions @@ -101,5 +102,7 @@ namespace WowUp.WPF.Extensions return AddonDisplayState.Unknown; } + + public static string GetFullFolderPath(this Addon addon, IWarcraftService warcraftService) => Path.GetFullPath(Path.Combine(warcraftService.GetAddonFolderPath(addon.ClientType), addon.FolderName)); } } diff --git a/WowUp.WPF/Utilities/FileUtilities.cs b/WowUp.WPF/Utilities/FileUtilities.cs index a2ed3ade..b5d08a90 100644 --- a/WowUp.WPF/Utilities/FileUtilities.cs +++ b/WowUp.WPF/Utilities/FileUtilities.cs @@ -168,5 +168,12 @@ namespace WowUp.WPF.Utilities } } } + + public static void OpenInFileManager(string path) + { + if (OperatingSystem.IsWindows()) { + Process.Start("explorer.exe", $"\"{path}\""); + } + } } } diff --git a/WowUp.WPF/Utilities/OperatingSystem.cs b/WowUp.WPF/Utilities/OperatingSystem.cs new file mode 100644 index 00000000..287a2641 --- /dev/null +++ b/WowUp.WPF/Utilities/OperatingSystem.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace WowUp.WPF.Utilities { + public static class OperatingSystem + { + public static bool IsWindows() => RuntimeInformation.IsOSPlatform(OSPlatform.Windows); + public static bool IsMacOS() => RuntimeInformation.IsOSPlatform(OSPlatform.OSX); + public static bool IsLinux() => RuntimeInformation.IsOSPlatform(OSPlatform.Linux); + } +} diff --git a/WowUp.WPF/ViewModels/AddonListItemViewModel.cs b/WowUp.WPF/ViewModels/AddonListItemViewModel.cs index cdcdcf0b..0985359b 100644 --- a/WowUp.WPF/ViewModels/AddonListItemViewModel.cs +++ b/WowUp.WPF/ViewModels/AddonListItemViewModel.cs @@ -1,5 +1,6 @@ using Serilog; using System; +using System.Diagnostics; using System.Threading.Tasks; using System.Windows; using System.Windows.Media; @@ -16,6 +17,7 @@ namespace WowUp.WPF.ViewModels { private readonly IAddonService _addonService; private readonly IAnalyticsService _analyticsService; + private readonly IWarcraftService _warcraftService; private readonly SolidColorBrush _rareBrush; private readonly SolidColorBrush _epicBrush; @@ -31,6 +33,7 @@ namespace WowUp.WPF.ViewModels } public Command ActionCommand { get; set; } + public Command OpenFolderCommand { get; set; } public Command InstallCommand { get; set; } public Command UpdateCommand { get; set; } public Command OpenLinkCommand { get; set; } @@ -257,12 +260,15 @@ namespace WowUp.WPF.ViewModels public AddonListItemViewModel( IAddonService addonService, - IAnalyticsService analyticsService) + IAnalyticsService analyticsService, + IWarcraftService warcraftService) : base() { _addonService = addonService; _analyticsService = analyticsService; + _warcraftService = warcraftService; + OpenFolderCommand = new Command(() => FileUtilities.OpenInFileManager(Addon.GetFullFolderPath(_warcraftService))); InstallCommand = new Command(async () => await InstallAddon()); UpdateCommand = new Command(async () => await UpdateAddon()); OpenLinkCommand = new Command(() => ExternalUrl.OpenUrlInBrowser()); diff --git a/WowUp.WPF/Views/AddonsView.xaml b/WowUp.WPF/Views/AddonsView.xaml index 603b06d7..3731e8ce 100644 --- a/WowUp.WPF/Views/AddonsView.xaml +++ b/WowUp.WPF/Views/AddonsView.xaml @@ -267,6 +267,9 @@ Command="{Binding AlphaCheckedCommand}"> + + From 8bfebdb0f1a41d352a9703e489ae84057e519562 Mon Sep 17 00:00:00 2001 From: Xathz Date: Tue, 29 Sep 2020 15:29:44 -0400 Subject: [PATCH 2/9] Changes requested from #64 https://github.com/jliddev/WowUp/pull/64#discussion_r496841623 --- WowUp.WPF/Utilities/FileUtilities.cs | 7 ------- WowUp.WPF/Utilities/OperatingSystem.cs | 10 ---------- WowUp.WPF/ViewModels/AddonListItemViewModel.cs | 2 +- 3 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 WowUp.WPF/Utilities/OperatingSystem.cs diff --git a/WowUp.WPF/Utilities/FileUtilities.cs b/WowUp.WPF/Utilities/FileUtilities.cs index b5d08a90..a2ed3ade 100644 --- a/WowUp.WPF/Utilities/FileUtilities.cs +++ b/WowUp.WPF/Utilities/FileUtilities.cs @@ -168,12 +168,5 @@ namespace WowUp.WPF.Utilities } } } - - public static void OpenInFileManager(string path) - { - if (OperatingSystem.IsWindows()) { - Process.Start("explorer.exe", $"\"{path}\""); - } - } } } diff --git a/WowUp.WPF/Utilities/OperatingSystem.cs b/WowUp.WPF/Utilities/OperatingSystem.cs deleted file mode 100644 index 287a2641..00000000 --- a/WowUp.WPF/Utilities/OperatingSystem.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Runtime.InteropServices; - -namespace WowUp.WPF.Utilities { - public static class OperatingSystem - { - public static bool IsWindows() => RuntimeInformation.IsOSPlatform(OSPlatform.Windows); - public static bool IsMacOS() => RuntimeInformation.IsOSPlatform(OSPlatform.OSX); - public static bool IsLinux() => RuntimeInformation.IsOSPlatform(OSPlatform.Linux); - } -} diff --git a/WowUp.WPF/ViewModels/AddonListItemViewModel.cs b/WowUp.WPF/ViewModels/AddonListItemViewModel.cs index 0985359b..80108e77 100644 --- a/WowUp.WPF/ViewModels/AddonListItemViewModel.cs +++ b/WowUp.WPF/ViewModels/AddonListItemViewModel.cs @@ -268,7 +268,7 @@ namespace WowUp.WPF.ViewModels _analyticsService = analyticsService; _warcraftService = warcraftService; - OpenFolderCommand = new Command(() => FileUtilities.OpenInFileManager(Addon.GetFullFolderPath(_warcraftService))); + OpenFolderCommand = new Command(() => Addon.GetFullFolderPath(_warcraftService).OpenUrlInBrowser()); InstallCommand = new Command(async () => await InstallAddon()); UpdateCommand = new Command(async () => await UpdateAddon()); OpenLinkCommand = new Command(() => ExternalUrl.OpenUrlInBrowser()); From 2a4ffc4ea480bbcac348342c4cf746e547f3edfc Mon Sep 17 00:00:00 2001 From: jliddev Date: Tue, 29 Sep 2020 17:43:28 -0500 Subject: [PATCH 3/9] Remove local ref? --- WowUp.Common/WowUp.Common.csproj | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/WowUp.Common/WowUp.Common.csproj b/WowUp.Common/WowUp.Common.csproj index f1f2d8f6..fba7a2e4 100644 --- a/WowUp.Common/WowUp.Common.csproj +++ b/WowUp.Common/WowUp.Common.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 @@ -7,12 +7,7 @@ - - - - - C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.netcore.universalwindowsplatform\6.2.10\ref\uap10.0.15138\System.ComponentModel.Annotations.dll - + From d7bfe14ea56aa38d86c43bd9f4075e33214f25d1 Mon Sep 17 00:00:00 2001 From: Xathz Date: Tue, 29 Sep 2020 19:39:54 -0400 Subject: [PATCH 4/9] Moved to AddonService from AddonExtensions https://github.com/jliddev/WowUp/pull/70#discussion_r497105526 --- WowUp.WPF/Extensions/AddonExtensions.cs | 2 -- WowUp.WPF/Services/AddonService.cs | 2 ++ WowUp.WPF/Services/Contracts/IAddonService.cs | 2 ++ WowUp.WPF/ViewModels/AddonListItemViewModel.cs | 7 ++----- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/WowUp.WPF/Extensions/AddonExtensions.cs b/WowUp.WPF/Extensions/AddonExtensions.cs index 29177243..e1cb27e4 100644 --- a/WowUp.WPF/Extensions/AddonExtensions.cs +++ b/WowUp.WPF/Extensions/AddonExtensions.cs @@ -109,7 +109,5 @@ namespace WowUp.WPF.Extensions addon1.ProviderName == addon2.ProviderName && addon1.ClientType == addon2.ClientType; } - - public static string GetFullFolderPath(this Addon addon, IWarcraftService warcraftService) => Path.GetFullPath(Path.Combine(warcraftService.GetAddonFolderPath(addon.ClientType), addon.FolderName)); } } diff --git a/WowUp.WPF/Services/AddonService.cs b/WowUp.WPF/Services/AddonService.cs index 164616e4..2c7701e9 100644 --- a/WowUp.WPF/Services/AddonService.cs +++ b/WowUp.WPF/Services/AddonService.cs @@ -48,6 +48,8 @@ namespace WowUp.WPF.Services public string BackupPath => Path.Combine(FileUtilities.AppDataPath, BackupFolder); + public string GetFullInstallPath(Addon addon) => Path.GetFullPath(Path.Combine(_warcraftService.GetAddonFolderPath(addon.ClientType), addon.FolderName)); + public AddonService( IServiceProvider serviceProvider, IAddonRepository addonRepository, diff --git a/WowUp.WPF/Services/Contracts/IAddonService.cs b/WowUp.WPF/Services/Contracts/IAddonService.cs index a2f66328..756e9280 100644 --- a/WowUp.WPF/Services/Contracts/IAddonService.cs +++ b/WowUp.WPF/Services/Contracts/IAddonService.cs @@ -18,6 +18,8 @@ namespace WowUp.WPF.Services.Contracts string BackupPath { get; } + string GetFullInstallPath(Addon addon); + Addon GetAddon(int addonId); Addon UpdateAddon(Addon addon); diff --git a/WowUp.WPF/ViewModels/AddonListItemViewModel.cs b/WowUp.WPF/ViewModels/AddonListItemViewModel.cs index 80108e77..7c289971 100644 --- a/WowUp.WPF/ViewModels/AddonListItemViewModel.cs +++ b/WowUp.WPF/ViewModels/AddonListItemViewModel.cs @@ -17,7 +17,6 @@ namespace WowUp.WPF.ViewModels { private readonly IAddonService _addonService; private readonly IAnalyticsService _analyticsService; - private readonly IWarcraftService _warcraftService; private readonly SolidColorBrush _rareBrush; private readonly SolidColorBrush _epicBrush; @@ -260,15 +259,13 @@ namespace WowUp.WPF.ViewModels public AddonListItemViewModel( IAddonService addonService, - IAnalyticsService analyticsService, - IWarcraftService warcraftService) + IAnalyticsService analyticsService) : base() { _addonService = addonService; _analyticsService = analyticsService; - _warcraftService = warcraftService; - OpenFolderCommand = new Command(() => Addon.GetFullFolderPath(_warcraftService).OpenUrlInBrowser()); + OpenFolderCommand = new Command(() => addonService.GetFullInstallPath(Addon).OpenUrlInBrowser()); InstallCommand = new Command(async () => await InstallAddon()); UpdateCommand = new Command(async () => await UpdateAddon()); OpenLinkCommand = new Command(() => ExternalUrl.OpenUrlInBrowser()); From f8335327bb397d8e686a990ef2ef149c60e1b8b2 Mon Sep 17 00:00:00 2001 From: jliddev Date: Wed, 30 Sep 2020 14:33:14 -0500 Subject: [PATCH 5/9] My addon view model can now update the list items during install #76 --- WowUp.WPF/Models/Events/AddonStateEventArgs.cs | 12 ++++++++++++ WowUp.WPF/Services/AddonService.cs | 18 ++++++++++++++++++ WowUp.WPF/Services/Contracts/IAddonService.cs | 2 ++ WowUp.WPF/ViewModels/AddonListItemViewModel.cs | 10 +++++----- WowUp.WPF/ViewModels/AddonsViewViewModel.cs | 9 +++++++++ WowUp.WPF/WowUp.WPF.csproj | 2 +- 6 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 WowUp.WPF/Models/Events/AddonStateEventArgs.cs diff --git a/WowUp.WPF/Models/Events/AddonStateEventArgs.cs b/WowUp.WPF/Models/Events/AddonStateEventArgs.cs new file mode 100644 index 00000000..44b14e7f --- /dev/null +++ b/WowUp.WPF/Models/Events/AddonStateEventArgs.cs @@ -0,0 +1,12 @@ +using WowUp.Common.Enums; +using WowUp.WPF.Entities; + +namespace WowUp.WPF.Models.Events +{ + public class AddonStateEventArgs + { + public Addon Addon { get; set; } + public AddonInstallState AddonInstallState { get; set; } + public decimal Progress { get; set; } + } +} diff --git a/WowUp.WPF/Services/AddonService.cs b/WowUp.WPF/Services/AddonService.cs index 164616e4..730ce49e 100644 --- a/WowUp.WPF/Services/AddonService.cs +++ b/WowUp.WPF/Services/AddonService.cs @@ -45,6 +45,7 @@ namespace WowUp.WPF.Services public event AddonEventHandler AddonUninstalled; public event AddonEventHandler AddonInstalled; public event AddonEventHandler AddonUpdated; + public event AddonStateEventHandler AddonStateChanged; public string BackupPath => Path.Combine(FileUtilities.AppDataPath, BackupFolder); @@ -383,6 +384,19 @@ namespace WowUp.WPF.Services await InstallAddon(addon.Id, onUpdate); } + private void SendAddonStateChange( + Addon addon, + AddonInstallState addonInstallState, + decimal progress) + { + AddonStateChanged?.Invoke(this, new AddonStateEventArgs + { + Addon = addon, + AddonInstallState = addonInstallState, + Progress = progress + }); + } + public async Task InstallAddon(int addonId, Action updateAction = null) { var addon = GetAddon(addonId); @@ -392,6 +406,7 @@ namespace WowUp.WPF.Services } updateAction?.Invoke(AddonInstallState.Downloading, 25m); + SendAddonStateChange(addon, AddonInstallState.Downloading, 25m); string downloadedFilePath = string.Empty; string unzippedDirectory = string.Empty; @@ -405,11 +420,13 @@ namespace WowUp.WPF.Services if (!string.IsNullOrEmpty(addon.InstalledVersion)) { updateAction?.Invoke(AddonInstallState.BackingUp, 0.50m); + SendAddonStateChange(addon, AddonInstallState.BackingUp, 75m); var backupZipFilePath = Path.Combine(BackupPath, $"{addon.Name}-{addon.InstalledVersion}.zip"); //await _downloadService.ZipFile(downloadedFilePath, backupZipFilePath); } updateAction?.Invoke(AddonInstallState.Installing, 75m); + SendAddonStateChange(addon, AddonInstallState.Installing, 75m); unzippedDirectory = await _downloadService.UnzipFile(downloadedFilePath); @@ -449,6 +466,7 @@ namespace WowUp.WPF.Services } updateAction?.Invoke(AddonInstallState.Complete, 100m); + SendAddonStateChange(addon, AddonInstallState.Complete, 100m); } private async Task CacheThumbnail(Addon addon) diff --git a/WowUp.WPF/Services/Contracts/IAddonService.cs b/WowUp.WPF/Services/Contracts/IAddonService.cs index a2f66328..1a41a369 100644 --- a/WowUp.WPF/Services/Contracts/IAddonService.cs +++ b/WowUp.WPF/Services/Contracts/IAddonService.cs @@ -9,12 +9,14 @@ using WowUp.WPF.Models.Events; namespace WowUp.WPF.Services.Contracts { public delegate void AddonEventHandler(object sender, AddonEventArgs e); + public delegate void AddonStateEventHandler(object sender, AddonStateEventArgs e); public interface IAddonService { event AddonEventHandler AddonUninstalled; event AddonEventHandler AddonInstalled; event AddonEventHandler AddonUpdated; + event AddonStateEventHandler AddonStateChanged; string BackupPath { get; } diff --git a/WowUp.WPF/ViewModels/AddonListItemViewModel.cs b/WowUp.WPF/ViewModels/AddonListItemViewModel.cs index cdcdcf0b..7e02aaf1 100644 --- a/WowUp.WPF/ViewModels/AddonListItemViewModel.cs +++ b/WowUp.WPF/ViewModels/AddonListItemViewModel.cs @@ -327,12 +327,9 @@ namespace WowUp.WPF.ViewModels public async Task UpdateAddon() { - ShowStatusText = false; - ShowUpdateButton = false; - try { - await _addonService.InstallAddon(_addon.Id, OnInstallUpdate); + await _addonService.InstallAddon(_addon.Id); } catch (Exception ex) { @@ -423,8 +420,11 @@ namespace WowUp.WPF.ViewModels _analyticsService.TrackUserAction("Addons", "Channel", channelType.ToString()); } - private void OnInstallUpdate(AddonInstallState installState, decimal percent) + public void OnInstallUpdate(AddonInstallState installState, decimal percent) { + ShowStatusText = false; + ShowUpdateButton = false; + try { ProgressText = GetInstallStateText(installState); diff --git a/WowUp.WPF/ViewModels/AddonsViewViewModel.cs b/WowUp.WPF/ViewModels/AddonsViewViewModel.cs index 49069ae0..59a8a469 100644 --- a/WowUp.WPF/ViewModels/AddonsViewViewModel.cs +++ b/WowUp.WPF/ViewModels/AddonsViewViewModel.cs @@ -212,6 +212,15 @@ namespace WowUp.WPF.ViewModels AddonUpdated(args.Addon); }; + _addonService.AddonStateChanged += (sender, args) => + { + var addon = DisplayAddons.FirstOrDefault(listItem => listItem.Addon.Id == args.Addon.Id); + if(addon != null) + { + addon.OnInstallUpdate(args.AddonInstallState, args.Progress); + } + }; + _warcraftService.ProductChanged += (sender, args) => { SetClientNames(); diff --git a/WowUp.WPF/WowUp.WPF.csproj b/WowUp.WPF/WowUp.WPF.csproj index 21f9e3e0..984780ff 100644 --- a/WowUp.WPF/WowUp.WPF.csproj +++ b/WowUp.WPF/WowUp.WPF.csproj @@ -10,7 +10,7 @@ WowUp Jliddev WowUp - 1.17.0 + 1.17.1 wowup_logo_512np_RRT_icon.ico jliddev https://wowup.io From b883ea2fad46d7b2d9714c1880ec69cc902efe27 Mon Sep 17 00:00:00 2001 From: jliddev Date: Wed, 30 Sep 2020 14:54:30 -0500 Subject: [PATCH 6/9] Update changelog.json --- WowUp.WPF/Assets/changelog.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/WowUp.WPF/Assets/changelog.json b/WowUp.WPF/Assets/changelog.json index 67d97deb..7e514000 100644 --- a/WowUp.WPF/Assets/changelog.json +++ b/WowUp.WPF/Assets/changelog.json @@ -1,5 +1,9 @@ { "ChangeLogs": [ + { + "Version": "1.17.1", + "Description": "Fix a visual bug where auto updated addons were not shown up to date on the My Addons page." + }, { "Version": "1.17.0", "Description": "Auto updates should function more like you would expect.\nSystem Notifications should appear when addons are auto updated.\nRe-Scan is now less desctructive, should preserve channels and auto update state.\nAdd the ability to update multiple clients at once by right clicking update-all.\nBug fixes.\nUI Updates." From a5e48adc9091c76d5b90426770ae5d25961ff25c Mon Sep 17 00:00:00 2001 From: jliddev Date: Wed, 30 Sep 2020 14:58:36 -0500 Subject: [PATCH 7/9] Update WowUp.WPF.csproj --- WowUp.WPF/WowUp.WPF.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WowUp.WPF/WowUp.WPF.csproj b/WowUp.WPF/WowUp.WPF.csproj index 375bdce6..e7df2025 100644 --- a/WowUp.WPF/WowUp.WPF.csproj +++ b/WowUp.WPF/WowUp.WPF.csproj @@ -10,7 +10,7 @@ WowUp Jliddev WowUp - 1.18.0-beta.1 + 1.18.0-beta.2 wowup_logo_512np_RRT_icon.ico jliddev https://wowup.io From 9be4f07bac9ec498a55afced23eb26b15ecc61ba Mon Sep 17 00:00:00 2001 From: jliddev Date: Wed, 30 Sep 2020 15:03:18 -0500 Subject: [PATCH 8/9] Update changelog.json --- WowUp.WPF/Assets/changelog.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/WowUp.WPF/Assets/changelog.json b/WowUp.WPF/Assets/changelog.json index 7e514000..6d988034 100644 --- a/WowUp.WPF/Assets/changelog.json +++ b/WowUp.WPF/Assets/changelog.json @@ -1,5 +1,9 @@ { "ChangeLogs": [ + { + "Version": "1.18.0", + "Description": "Add an 'Open Folder' option to the addon context menu (By Xathz)" + }, { "Version": "1.17.1", "Description": "Fix a visual bug where auto updated addons were not shown up to date on the My Addons page." From 8343b63fe5b88fc0efae2b1131ab2122eb68aec2 Mon Sep 17 00:00:00 2001 From: jliddev Date: Wed, 30 Sep 2020 15:07:55 -0500 Subject: [PATCH 9/9] Sort featured addons by download count. --- WowUp.WPF/Assets/changelog.json | 2 +- WowUp.WPF/Services/AddonService.cs | 2 +- WowUp.WPF/WowUp.WPF.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WowUp.WPF/Assets/changelog.json b/WowUp.WPF/Assets/changelog.json index 6d988034..863f3f1c 100644 --- a/WowUp.WPF/Assets/changelog.json +++ b/WowUp.WPF/Assets/changelog.json @@ -2,7 +2,7 @@ "ChangeLogs": [ { "Version": "1.18.0", - "Description": "Add an 'Open Folder' option to the addon context menu (By Xathz)" + "Description": "Add an 'Open Folder' option to the addon context menu (By Xathz).\nFeatured addons are now sorted by download count." }, { "Version": "1.17.1", diff --git a/WowUp.WPF/Services/AddonService.cs b/WowUp.WPF/Services/AddonService.cs index d15aef42..455bfba6 100644 --- a/WowUp.WPF/Services/AddonService.cs +++ b/WowUp.WPF/Services/AddonService.cs @@ -163,7 +163,7 @@ namespace WowUp.WPF.Services var addonResults = await Task.WhenAll(addonTasks); var addonResultsConcat = addonResults.SelectMany(res => res); - return addonResultsConcat.ToList(); + return addonResultsConcat.OrderByDescending(result => result.DownloadCount).ToList(); } public async Task> GetAddons(WowClientType clientType, bool rescan = false) diff --git a/WowUp.WPF/WowUp.WPF.csproj b/WowUp.WPF/WowUp.WPF.csproj index e7df2025..a2efea08 100644 --- a/WowUp.WPF/WowUp.WPF.csproj +++ b/WowUp.WPF/WowUp.WPF.csproj @@ -10,7 +10,7 @@ WowUp Jliddev WowUp - 1.18.0-beta.2 + 1.18.0-beta.3 wowup_logo_512np_RRT_icon.ico jliddev https://wowup.io