Fixed issue where creating a new Wallet doesn't Initialize it
This commit is contained in:
@@ -21,7 +21,8 @@ public class CountCategoriesHandler(IDbContextFactory<WalletContext> dbContextFa
|
|||||||
})
|
})
|
||||||
.ToListAsync(cancellationToken: cancellationToken);
|
.ToListAsync(cancellationToken: cancellationToken);
|
||||||
|
|
||||||
var categoryCounts = await context.Items.Where(x => !string.IsNullOrEmpty(x.Category))
|
var categoryCounts = await context.Items.Where(x => x.State != 2 &&
|
||||||
|
!string.IsNullOrEmpty(x.Category))
|
||||||
.GroupBy(i => i.Category)
|
.GroupBy(i => i.Category)
|
||||||
.Select(g => new
|
.Select(g => new
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ public class WalletActivatedHandler(IWalletHostCollection Wallets,
|
|||||||
{
|
{
|
||||||
if (host.Services.GetRequiredService<IServiceFactory>() is IServiceFactory serviceFactory)
|
if (host.Services.GetRequiredService<IServiceFactory>() is IServiceFactory serviceFactory)
|
||||||
{
|
{
|
||||||
if (serviceFactory.Create<WalletNavigationViewModel>(descriptor.Name, false)
|
if (serviceFactory.Create<WalletNavigationViewModel>(args => args.Initialize(),
|
||||||
|
descriptor.Name, false)
|
||||||
is WalletNavigationViewModel viewModel)
|
is WalletNavigationViewModel viewModel)
|
||||||
{
|
{
|
||||||
publisher.Publish(Insert.As<IMainNavigationViewModel>(index, viewModel),
|
publisher.Publish(Insert.As<IMainNavigationViewModel>(index, viewModel),
|
||||||
|
|||||||
Reference in New Issue
Block a user