Fixed more edge cases
This commit is contained in:
@@ -18,13 +18,13 @@ public class AggerateContainerViewModelHandler(IMediator mediator,
|
||||
bool selected = true;
|
||||
|
||||
if (await mediator.Handle<RequestEventArgs<QueryContainerConfiguration>,
|
||||
IReadOnlyCollection<(int Id, string? Name, bool Favourite, bool Archived)>>(Request.As(new QueryContainerConfiguration
|
||||
IReadOnlyCollection<(int Id, string Name, bool Favourite, bool Archived)>>(Request.As(new QueryContainerConfiguration
|
||||
{
|
||||
Filter = configuration.Filter,
|
||||
Query = configuration.Query
|
||||
})) is IReadOnlyCollection<(int Id, string? Name, bool Favourite, bool Archived)> results)
|
||||
})) is IReadOnlyCollection<(int Id, string Name, bool Favourite, bool Archived)> results)
|
||||
{
|
||||
foreach ((int Id, string? Name, bool Favourite, bool Archived) in results)
|
||||
foreach ((int Id, string Name, bool Favourite, bool Archived) in results)
|
||||
{
|
||||
IServiceScope serviceScope = serviceProvider.CreateScope();
|
||||
IServiceFactory serviceFactory = serviceScope.ServiceProvider.GetRequiredService<IServiceFactory>();
|
||||
@@ -35,6 +35,7 @@ public class AggerateContainerViewModelHandler(IMediator mediator,
|
||||
Item item = new() { Id = Id, Name = Name };
|
||||
valueStore.Set(item);
|
||||
|
||||
cache.Add(item);
|
||||
publisher.Publish(Create.As(viewModel), nameof(ContainerViewModel));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user