Cleaned up progress notification.

This commit is contained in:
kay.one 2011-11-20 20:43:16 -08:00
parent 6e9a6313ff
commit 0a70c836df
5 changed files with 86 additions and 35 deletions

View file

@ -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;
}