aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/NotificationsService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/NotificationsService.cs')
-rw-r--r--MediaBrowser.Api/NotificationsService.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/MediaBrowser.Api/NotificationsService.cs b/MediaBrowser.Api/NotificationsService.cs
index 51a080106..69f1f3489 100644
--- a/MediaBrowser.Api/NotificationsService.cs
+++ b/MediaBrowser.Api/NotificationsService.cs
@@ -157,7 +157,12 @@ namespace MediaBrowser.Api
private Task MarkRead(string idList, string userId, bool read)
{
- var ids = idList.Split(',');
+ var ids = (idList ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
+
+ if (ids.Length == 0)
+ {
+ return _notificationsRepo.MarkAllRead(userId, read, CancellationToken.None);
+ }
return _notificationsRepo.MarkRead(ids, userId, read, CancellationToken.None);
}