Update notificaiton counter record (#6169)

This commit is contained in:
Chukwuleta Tobechi 2024-08-29 11:47:29 +01:00 committed by GitHub
parent 8d1904c185
commit 25ccc6a9f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,7 +37,7 @@
<div id="NotificationsList" v-pre>
@foreach (var n in Last5)
{
<a href="@NotificationUrl(n.Id)" class="notification d-flex align-items-center dropdown-item border-bottom border-light py-3 px-4">
<a href="@NotificationUrl(n.Id)" class="notification d-flex align-items-center dropdown-item border-bottom border-light py-3 px-4" @key="@n.Id">
<div class="me-3">
<Icon Symbol="@NotificationIcon(n.Identifier)" />
</div>
@ -99,6 +99,7 @@
{
UnseenCount = SeenCount(res.Count);
Last5 = res.Items;
StateHasChanged();
}
protected override async Task OnParametersSetAsync()
@ -134,6 +135,7 @@
{
await _NotificationManager.ToggleSeen(new NotificationsQuery() { Seen = false, UserId = userId }, true);
UnseenCount = "0";
StateHasChanged();
}
}