mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-27 12:33:00 +02: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