share additem viewmodel instance with homepage and navbar.
MODIFY
WalletWasabi.Fluent/ViewModels/HomePageViewModel.cs
WalletWasabi.Fluent/ViewModels/HomePageViewModel.cs
@@ -10,12 +10,12 @@ namespace WalletWasabi.Fluent.ViewModels
{
private readonly ReadOnlyObservableCollection<NavBarItemViewModel> _items;
- public HomePageViewModel(IScreen screen, WalletManagerViewModel walletManager) : base(screen)
+ public HomePageViewModel(IScreen screen, WalletManagerViewModel walletManager, AddWalletPageViewModel addWalletPage) : base(screen)
{
Title = "Home";
var list = new SourceList<NavBarItemViewModel>();
- list.Add(new AddWalletPageViewModel(screen));
+ list.Add(addWalletPage);
walletManager.Items.ToObservableChangeSet()
.Cast(x => x as NavBarItemViewModel)

MODIFY
WalletWasabi.Fluent/ViewModels/NavBarViewModel.cs
WalletWasabi.Fluent/ViewModels/NavBarViewModel.cs
@@ -33,9 +33,10 @@ namespace WalletWasabi.Fluent.ViewModels
_topItems = new ObservableCollection<NavBarItemViewModel>();
_bottomItems = new ObservableCollection<NavBarItemViewModel>();
- SelectedItem = new HomePageViewModel(screen, walletManager);
+ var addWalletPage = new AddWalletPageViewModel(screen);
+ SelectedItem = new HomePageViewModel(screen, walletManager, addWalletPage);
_topItems.Add(_selectedItem);
- _bottomItems.Add(new AddWalletPageViewModel(screen));
+ _bottomItems.Add(addWalletPage);
_bottomItems.Add(new SettingsPageViewModel(screen));
Router.CurrentViewModel

share additem viewmodel instance with homepage and navbar.