From 319d239171eecb1e6f48bfb2952eab02795ec279 Mon Sep 17 00:00:00 2001 From: Kill_Me_I_Noobs <118206719+Vonsant@users.noreply.github.com> Date: Wed, 1 Jan 2025 05:28:44 +0300 Subject: [PATCH] Update SharedNanoChatSystem.cs --- .../_CorvaxNext/NanoChat/SharedNanoChatSystem.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Content.Shared/_CorvaxNext/NanoChat/SharedNanoChatSystem.cs b/Content.Shared/_CorvaxNext/NanoChat/SharedNanoChatSystem.cs index f40b84cbb92..4dd281f84e1 100644 --- a/Content.Shared/_CorvaxNext/NanoChat/SharedNanoChatSystem.cs +++ b/Content.Shared/_CorvaxNext/NanoChat/SharedNanoChatSystem.cs @@ -56,6 +56,17 @@ public void SetNumber(Entity card, uint number) Dirty(card); } + /// + /// Sets IsClosed for a card. + /// + public void SetClosed(Entity card, bool closed) + { + if (!Resolve(card, ref card.Comp)) + return; + + card.Comp.IsClosed = closed; + } + /// /// Gets the recipients dictionary from a card. /// @@ -170,7 +181,7 @@ public bool GetNotificationsMuted(Entity card) /// public void SetNotificationsMuted(Entity card, bool muted) { - if (!Resolve(card, ref card.Comp)) + if (!Resolve(card, ref card.Comp) || card.Comp.NotificationsMuted == muted) return; card.Comp.NotificationsMuted = muted;