We are confidence enough that the data will be saved to the db, so lets change how we update the UI, so instead of wating on the db call to complete, we will just update the UI while the db call is in progress

This commit is contained in:
TheXamlGuy
2024-05-22 20:13:50 +01:00
parent 0d7cb192d5
commit 9c8c7bf889
9 changed files with 46 additions and 55 deletions
@@ -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<(Guid 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<(Guid Id, string Name, bool Favourite, bool Archived)> results)
{
foreach ((int Id, string Name, bool Favourite, bool Archived) in results)
foreach ((Guid Id, string Name, bool Favourite, bool Archived) in results)
{
IServiceScope serviceScope = serviceProvider.CreateScope();
IServiceFactory serviceFactory = serviceScope.ServiceProvider.GetRequiredService<IServiceFactory>();
@@ -43,5 +43,7 @@ public class AggerateContainerViewModelHandler(IMediator mediator,
}
}
}
var d = cache;
}
}