mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-07 18:24:19 -04:00
fixed new item notifications
This commit is contained in:
parent
e36467f651
commit
9a4f73b9c8
@ -1,4 +1,5 @@
|
|||||||
using MediaBrowser.Controller.Entities;
|
using System.Windows;
|
||||||
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.Plugins;
|
using MediaBrowser.Controller.Plugins;
|
||||||
using MediaBrowser.Model.Logging;
|
using MediaBrowser.Model.Logging;
|
||||||
@ -110,23 +111,29 @@ namespace MediaBrowser.ServerApplication
|
|||||||
// Show the notification
|
// Show the notification
|
||||||
if (newItems.Count == 1)
|
if (newItems.Count == 1)
|
||||||
{
|
{
|
||||||
var window = (MainWindow) App.Current.MainWindow;
|
Application.Current.Dispatcher.InvokeAsync(() =>
|
||||||
|
|
||||||
window.Dispatcher.InvokeAsync(() => window.MbTaskbarIcon.ShowCustomBalloon(new ItemUpdateNotification(_logger)
|
|
||||||
{
|
{
|
||||||
DataContext = newItems[0]
|
var window = (MainWindow)Application.Current.MainWindow;
|
||||||
|
|
||||||
}, PopupAnimation.Slide, 6000));
|
window.Dispatcher.InvokeAsync(() => window.MbTaskbarIcon.ShowCustomBalloon(new ItemUpdateNotification(_logger)
|
||||||
|
{
|
||||||
|
DataContext = newItems[0]
|
||||||
|
|
||||||
|
}, PopupAnimation.Slide, 6000));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else if (newItems.Count > 1)
|
else if (newItems.Count > 1)
|
||||||
{
|
{
|
||||||
var window = (MainWindow)App.Current.MainWindow;
|
Application.Current.Dispatcher.InvokeAsync(() =>
|
||||||
|
|
||||||
window.Dispatcher.InvokeAsync(() => window.MbTaskbarIcon.ShowCustomBalloon(new MultiItemUpdateNotification(_logger)
|
|
||||||
{
|
{
|
||||||
DataContext = newItems
|
var window = (MainWindow)Application.Current.MainWindow;
|
||||||
|
|
||||||
}, PopupAnimation.Slide, 6000));
|
window.Dispatcher.InvokeAsync(() => window.MbTaskbarIcon.ShowCustomBalloon(new MultiItemUpdateNotification(_logger)
|
||||||
|
{
|
||||||
|
DataContext = newItems
|
||||||
|
|
||||||
|
}, PopupAnimation.Slide, 6000));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user