aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-12-08 10:40:20 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-12-08 10:40:20 -0500
commit56fb08eeed47102c0b0f8cf656036586e3e99bf2 (patch)
tree550b0cf72c0f1df485c20afc96b0847446e35c7c /Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs
parent9ed3c311757a615ae32296da4b43f772370d1143 (diff)
added delete helper
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();
}
}