From e1a0de3bcfd08fda9a2a350ebd4282025580679f Mon Sep 17 00:00:00 2001 From: Visne <39844191+Visne@users.noreply.github.com> Date: Sat, 10 Sep 2022 05:14:17 +0200 Subject: [PATCH] Fix cargo request computer category sorting (#11147) * Revert "Automatic changelog update" This reverts commit 18f714efce9b1b942e9f9d259186a3021b40d03f. * Fix cargo request computer category sorting --- Content.Client/Cargo/UI/CargoConsoleMenu.xaml.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Content.Client/Cargo/UI/CargoConsoleMenu.xaml.cs b/Content.Client/Cargo/UI/CargoConsoleMenu.xaml.cs index c62da36b6a..9b4442dc95 100644 --- a/Content.Client/Cargo/UI/CargoConsoleMenu.xaml.cs +++ b/Content.Client/Cargo/UI/CargoConsoleMenu.xaml.cs @@ -99,8 +99,6 @@ namespace Content.Client.Cargo.UI _categoryStrings.Clear(); Categories.Clear(); - _categoryStrings.Add(Loc.GetString("cargo-console-menu-populate-categories-all-text")); - foreach (var prototype in ProductPrototypes) { if (!_categoryStrings.Contains(prototype.Category)) @@ -108,7 +106,12 @@ namespace Content.Client.Cargo.UI _categoryStrings.Add(Loc.GetString(prototype.Category)); } } + _categoryStrings.Sort(); + + // Add "All" category at the top of the list + _categoryStrings.Insert(0, Loc.GetString("cargo-console-menu-populate-categories-all-text")); + foreach (var str in _categoryStrings) { Categories.AddItem(str);