Skip to content

Commit

Permalink
Update SharedNanoChatSystem.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Vonsant authored Jan 1, 2025
1 parent 0a0b1d8 commit 319d239
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Content.Shared/_CorvaxNext/NanoChat/SharedNanoChatSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ public void SetNumber(Entity<NanoChatCardComponent?> card, uint number)
Dirty(card);
}

/// <summary>
/// Sets IsClosed for a card.
/// </summary>
public void SetClosed(Entity<NanoChatCardComponent?> card, bool closed)
{
if (!Resolve(card, ref card.Comp))
return;

card.Comp.IsClosed = closed;
}

/// <summary>
/// Gets the recipients dictionary from a card.
/// </summary>
Expand Down Expand Up @@ -170,7 +181,7 @@ public bool GetNotificationsMuted(Entity<NanoChatCardComponent?> card)
/// </summary>
public void SetNotificationsMuted(Entity<NanoChatCardComponent?> card, bool muted)
{
if (!Resolve(card, ref card.Comp))
if (!Resolve(card, ref card.Comp) || card.Comp.NotificationsMuted == muted)
return;

card.Comp.NotificationsMuted = muted;
Expand Down

0 comments on commit 319d239

Please sign in to comment.