Add suport for adding new items which are sorted without reloading the entrie list
This commit is contained in:
@@ -9,6 +9,8 @@ using Toolkit.Foundation;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using HotAvalonia;
|
||||
using Bitvault.Data;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bitvault.Avalonia;
|
||||
|
||||
@@ -41,6 +43,9 @@ public partial class App : Application
|
||||
{
|
||||
args.AddServices(services =>
|
||||
{
|
||||
services.AddTransient<IComparer<Item>>(provider => Comparer<Item>.Create((x, z) => x.Name!.CompareTo(z.Name)));
|
||||
services.AddCache<Item>();
|
||||
|
||||
services.AddTransient<IKeyGenerator, KeyGenerator>();
|
||||
services.AddTransient<IEncryptor, AesEncryptor>();
|
||||
services.AddTransient<IDecryptor, AesDecryptor>();
|
||||
@@ -89,7 +94,7 @@ public partial class App : Application
|
||||
|
||||
services.AddTemplate<ItemHeaderViewModel, ItemHeaderView>();
|
||||
|
||||
services.AddHandler<CreateItemHandler>();
|
||||
services.AddHandler<CreateItemHandler>(ServiceLifetime.Singleton);
|
||||
services.AddHandler<ItemActivatedHandler>();
|
||||
});
|
||||
})!);
|
||||
|
||||
Reference in New Issue
Block a user