aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs')
-rw-r--r--Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs b/Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs
index 767ba5504..aae41da19 100644
--- a/Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs
+++ b/Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs
@@ -115,18 +115,18 @@ namespace Emby.Server.Implementations.Notifications
statement.TryBind("@IsRead", false);
statement.TryBind("@UserId", userId.ToGuidParamValue());
+ var levels = new List<NotificationLevel>();
+
foreach (var row in statement.ExecuteQuery())
{
- var levels = new List<NotificationLevel>();
-
levels.Add(GetLevel(row, 0));
+ }
- result.UnreadCount = levels.Count;
+ result.UnreadCount = levels.Count;
- if (levels.Count > 0)
- {
- result.MaxUnreadNotificationLevel = levels.Max();
- }
+ if (levels.Count > 0)
+ {
+ result.MaxUnreadNotificationLevel = levels.Max();
}
}