Show initial category count
This commit is contained in:
@@ -8,20 +8,20 @@ public class NavigateHandler(NamedComponent scope,
|
||||
{
|
||||
public Task Handle(NavigateEventArgs args)
|
||||
{
|
||||
INavigationScope? navigationScope = null;
|
||||
INavigation? navigationScope = null;
|
||||
if (args.Scope is "self" || args.Scope is "new")
|
||||
{
|
||||
if (args.Sender is IServiceProviderRequired requireServiceProvider)
|
||||
{
|
||||
if (args.Scope is "self")
|
||||
{
|
||||
navigationScope = requireServiceProvider.Provider.GetRequiredService<INavigationScope>();
|
||||
navigationScope = requireServiceProvider.Provider.GetRequiredService<INavigation>();
|
||||
}
|
||||
|
||||
if (args.Scope is "new")
|
||||
{
|
||||
IServiceScope serviceScope = requireServiceProvider.Provider.CreateScope();
|
||||
navigationScope = serviceScope.ServiceProvider.GetRequiredService<INavigationScope>();
|
||||
navigationScope = serviceScope.ServiceProvider.GetRequiredService<INavigation>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,7 @@ public class NavigateHandler(NamedComponent scope,
|
||||
if (navigationScope is null)
|
||||
{
|
||||
ComponentScopeDescriptor? descriptor = componentScopeProvider.Get(args.Scope ?? scope.Name);
|
||||
navigationScope = descriptor?.Services?.GetRequiredService<INavigationScope>();
|
||||
navigationScope = descriptor?.Services?.GetRequiredService<INavigation>();
|
||||
}
|
||||
|
||||
navigationScope?.Navigate(args.Route, args.Sender,
|
||||
|
||||
Reference in New Issue
Block a user