mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-13 16:43:58 -07:00
Cleaned up progress notification.
This commit is contained in:
parent
6e9a6313ff
commit
0a70c836df
5 changed files with 86 additions and 35 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue