diff --git a/Content.Client/Store/Ui/StoreBoundUserInterface.cs b/Content.Client/Store/Ui/StoreBoundUserInterface.cs index 0860abb9fa..6774ef35a0 100644 --- a/Content.Client/Store/Ui/StoreBoundUserInterface.cs +++ b/Content.Client/Store/Ui/StoreBoundUserInterface.cs @@ -2,6 +2,9 @@ using Content.Shared.Store; using JetBrains.Annotations; using Robust.Client.GameObjects; using System.Linq; +using System.Threading; +using Serilog; +using Timer = Robust.Shared.Timing.Timer; namespace Content.Client.Store.Ui; @@ -40,6 +43,11 @@ public sealed class StoreBoundUserInterface : BoundUserInterface { SendMessage(new StoreRequestWithdrawMessage(type, amount)); }; + + _menu.OnRefreshButtonPressed += (_) => + { + SendMessage(new StoreRequestUpdateInterfaceMessage()); + }; } protected override void UpdateState(BoundUserInterfaceState state) { @@ -53,6 +61,7 @@ public sealed class StoreBoundUserInterface : BoundUserInterface case StoreUpdateState msg: _menu.UpdateBalance(msg.Balance); _menu.PopulateStoreCategoryButtons(msg.Listings); + _menu.UpdateListing(msg.Listings.ToList()); _menu.SetFooterVisibility(msg.ShowFooter); break; @@ -71,7 +80,6 @@ public sealed class StoreBoundUserInterface : BoundUserInterface base.Dispose(disposing); if (!disposing) return; - _menu?.Close(); _menu?.Dispose(); } diff --git a/Content.Client/Store/Ui/StoreMenu.xaml b/Content.Client/Store/Ui/StoreMenu.xaml index 824c153671..a454e3e2b7 100644 --- a/Content.Client/Store/Ui/StoreMenu.xaml +++ b/Content.Client/Store/Ui/StoreMenu.xaml @@ -12,6 +12,11 @@ HorizontalAlignment="Left" Access="Public" HorizontalExpand="True" /> +