Updated task notification UI. Last message will stay on screen for an extra 3 seconds if there are no new messages.

This commit is contained in:
kay.one 2011-04-23 21:06:34 -07:00
commit 0d139f9c21
7 changed files with 77 additions and 58 deletions

View file

@ -24,9 +24,17 @@ namespace NzbDrone.Core.Providers
{
get
{
return
new List<ProgressNotification>(
_progressNotification.Values.Where(p => p.Status == ProgressNotificationStatus.InProgress));
var activeNotification = _progressNotification.Values.Where(p => p.Status == ProgressNotificationStatus.InProgress).ToList();
if (activeNotification.Count == 0)
{
//Get notifications that were recently done
activeNotification = _progressNotification.Values.Where(p => p.CompletedTime >= DateTime.Now.AddSeconds(-3)).OrderByDescending(c => c.CompletedTime).ToList();
}
return activeNotification.ToList();
}
}