diff options
| author | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-09-02 07:00:27 -0300 |
|---|---|---|
| committer | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-09-02 07:00:27 -0300 |
| commit | 4be033a60846cbdd290da27be44f270eba5a964d (patch) | |
| tree | 60951531e33fe8e1fb71e0f208104ac02b001cf6 | |
| parent | 2023ac3fa6477142299115b056b4ad380a9a9f7a (diff) | |
Melhorado método para apagar mensagens.
| -rw-r--r-- | scripts/Utils/MessageLogData.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/Utils/MessageLogData.cs b/scripts/Utils/MessageLogData.cs index ed30062..e8f0f09 100644 --- a/scripts/Utils/MessageLogData.cs +++ b/scripts/Utils/MessageLogData.cs @@ -16,7 +16,9 @@ private Message LastMessage { } public void ClearMessages() { - foreach (Message message in messages) { + for (int i = messages.Count - 1; i >= 0; i--) { + Message message = messages[i]; + messages.RemoveAt(i); message.QueueFree(); } } |
