Fixed issue with dialog opening but is not closing due to request running into a "ContentControlHandler" after the dialog's await state has been completed.

This commit is contained in:
Daniel Clark
2022-12-21 10:12:54 +00:00
parent e9dd86e0e0
commit b8e50e4dc0
8 changed files with 25 additions and 24 deletions
@@ -3,9 +3,9 @@ using Toolkit.Framework.Foundation;
namespace Toolkit.Framework.Avalonia;
public class ContentControlNavigationHandler : IRequestHandler<ContentControlNavigation, bool>
public class ContentControlNavigationHandler : IRequestHandler<ContentControlNavigation>
{
public ValueTask<bool> Handle(ContentControlNavigation request, CancellationToken cancellationToken)
public ValueTask<Unit> Handle(ContentControlNavigation request, CancellationToken cancellationToken)
{
if (request.Template is TemplatedControl control)
{
@@ -13,6 +13,6 @@ public class ContentControlNavigationHandler : IRequestHandler<ContentControlNav
request.Route.Content = control;
}
return new ValueTask<bool>(true);
return default;
}
}