mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-18 21:35:51 -04:00
Cleaned up progress notification.
This commit is contained in:
@@ -9,13 +9,14 @@ namespace NzbDrone.Web.Controllers
|
||||
{
|
||||
public class NotificationController : Controller
|
||||
{
|
||||
private readonly NotificationProvider _notifications;
|
||||
private readonly NotificationProvider _notificationProvider;
|
||||
|
||||
//
|
||||
// GET: /Notification/
|
||||
|
||||
public NotificationController(NotificationProvider notificationProvider)
|
||||
{
|
||||
_notifications = notificationProvider;
|
||||
_notificationProvider = notificationProvider;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
@@ -36,11 +37,10 @@ namespace NzbDrone.Web.Controllers
|
||||
|
||||
private string GetCurrentMessage()
|
||||
{
|
||||
var notes = _notifications.ProgressNotifications;
|
||||
|
||||
if (_notifications.ProgressNotifications.Count > 0)
|
||||
return _notifications.ProgressNotifications[0].CurrentMessage;
|
||||
var notification = _notificationProvider.GetCurrent();
|
||||
|
||||
if (notification != null)
|
||||
return notification.CurrentMessage;
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user