diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-12-09 21:02:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-09 21:02:33 -0500 |
| commit | c79706efe543199c7efdaef2bc2afd8dfb9b5e61 (patch) | |
| tree | dcb5dee8328bc50978ec09fb3075d5244faad165 /Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs | |
| parent | 003650f2d669d68cd382281daa2d3af8a1a02d30 (diff) | |
| parent | e936f49518bcd6e28d44600d58205fee9c1e21fd (diff) | |
Merge pull request #2334 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs')
| -rw-r--r-- | Emby.Server.Implementations/Notifications/SqliteNotificationsRepository.cs | 14 |
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(); } } |
