diff --git a/Content.Client/Store/Ui/StoreBoundUserInterface.cs b/Content.Client/Store/Ui/StoreBoundUserInterface.cs index 7ed67f7b5d..8c48258de0 100644 --- a/Content.Client/Store/Ui/StoreBoundUserInterface.cs +++ b/Content.Client/Store/Ui/StoreBoundUserInterface.cs @@ -19,7 +19,7 @@ public sealed class StoreBoundUserInterface : BoundUserInterface private string _search = string.Empty; [ViewVariables] - private HashSet _listings = new(); + private HashSet _listings = new(); public StoreBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) { @@ -33,7 +33,7 @@ public sealed class StoreBoundUserInterface : BoundUserInterface _menu.OnListingButtonPressed += (_, listing) => { - SendMessage(new StoreBuyListingMessage(listing)); + SendMessage(new StoreBuyListingMessage(listing.ID)); }; _menu.OnCategoryButtonPressed += (_, category) => @@ -68,6 +68,7 @@ public sealed class StoreBoundUserInterface : BoundUserInterface _listings = msg.Listings; _menu?.UpdateBalance(msg.Balance); + UpdateListingsWithSearchFilter(); _menu?.SetFooterVisibility(msg.ShowFooter); _menu?.UpdateRefund(msg.AllowRefund); @@ -80,7 +81,7 @@ public sealed class StoreBoundUserInterface : BoundUserInterface if (_menu == null) return; - var filteredListings = new HashSet(_listings); + var filteredListings = new HashSet(_listings); if (!string.IsNullOrEmpty(_search)) { filteredListings.RemoveWhere(listingData => !ListingLocalisationHelpers.GetLocalisedNameOrEntityName(listingData, _prototypeManager).Trim().ToLowerInvariant().Contains(_search) && diff --git a/Content.Client/Store/Ui/StoreListingControl.xaml b/Content.Client/Store/Ui/StoreListingControl.xaml index 12b4d7b5b3..3142f1cb06 100644 --- a/Content.Client/Store/Ui/StoreListingControl.xaml +++ b/Content.Client/Store/Ui/StoreListingControl.xaml @@ -2,6 +2,8 @@