Fixed stackoverflow...

This commit is contained in:
Daniel Clark
2021-02-05 21:32:32 +00:00
parent b411f82243
commit 2be7a1128c
9 changed files with 61 additions and 49 deletions
@@ -80,6 +80,7 @@ namespace NotificationFlyout.Wpf.UI.Controls
private NotificationFlyoutPresenter GetNotificationFlyoutPresenter()
{
if (_host == null) return null;
return _host.GetUwpInternalObject() as NotificationFlyoutPresenter;
}
@@ -154,6 +155,8 @@ namespace NotificationFlyout.Wpf.UI.Controls
private void UpdateWindow()
{
var flyoutPresenter = GetNotificationFlyoutPresenter();
if (flyoutPresenter == null) return;
var taskbarState = _taskbarHelper.GetCurrentState();
var screen = Screen.FromHandle(this.GetHandle());