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
+3 -13
View File
@@ -5,23 +5,13 @@ using Toolkit.Foundation;
namespace Bitvault;
public class QueryItemHandler(IDbContextFactory<ContainerDbContext> dbContextFactory) :
IHandler<RequestEventArgs<QueryItemConfiguration>, (int Id, string? Name)>
{
public Task<(int Id, string? Name)> Handle(RequestEventArgs<QueryItemConfiguration> args,
CancellationToken cancellationToken)
{
throw new NotImplementedException();
}
}
public class QueryContainerHandler(IDbContextFactory<ContainerDbContext> dbContextFactory) :
IHandler<RequestEventArgs<QueryContainerConfiguration>, IReadOnlyCollection<(int Id, string? Name, bool Favourite, bool Archived)>>
IHandler<RequestEventArgs<QueryContainerConfiguration>, IReadOnlyCollection<(Guid Id, string? Name, bool Favourite, bool Archived)>>
{
public async Task<IReadOnlyCollection<(int Id, string Name, bool Favourite, bool Archived)>> Handle(RequestEventArgs<QueryContainerConfiguration> args,
public async Task<IReadOnlyCollection<(Guid Id, string? Name, bool Favourite, bool Archived)>> Handle(RequestEventArgs<QueryContainerConfiguration> args,
CancellationToken cancellationToken)
{
List<(int Id, string Name, bool Favourite, bool Archived)> items = [];
List<(Guid Id, string Name, bool Favourite, bool Archived)> items = [];
if (args.Value is QueryContainerConfiguration queryConfiguration)
{