Miscellaneous website/moderation/notification fixes (#940)

This commit is contained in:
sudokoko 2023-10-30 13:46:05 -04:00 committed by GitHub
parent 0de5edca6e
commit 69855406f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 11 deletions

View file

@ -89,16 +89,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.";
StringBuilder builder = new();
// ReSharper disable once ForCanBeConvertedToForeach
// Suppressing this because we need to modify the list while iterating over it.
for (int i = 0; i < notifications.Count; i++)
foreach (NotificationEntity notification in notifications)
{
NotificationEntity n = notifications[i];
builder.AppendLine(LighthouseSerializer.Serialize(this.HttpContext.RequestServices,
GameNotification.CreateFromEntity(n)));
GameNotification.CreateFromEntity(notification)));
n.IsDismissed = true;
notification.IsDismissed = true;
}
await this.database.SaveChangesAsync();