Fix admin note updates duplicating visually across all open note windows (#15471)

This commit is contained in:
DrSmugleaf
2023-04-16 23:18:54 -07:00
committed by GitHub
parent fa8906da36
commit 13d299dea3
5 changed files with 25 additions and 6 deletions

View File

@@ -117,13 +117,19 @@ public sealed class AdminNotesEui : BaseEui
private void NoteModified(SharedAdminNote note)
{
if (note.Player != NotedPlayer)
return;
Notes[note.Id] = note;
StateDirty();
}
private void NoteDeleted(int id)
private void NoteDeleted(SharedAdminNote note)
{
Notes.Remove(id);
if (note.Player != NotedPlayer)
return;
Notes.Remove(note.Id);
StateDirty();
}