wallet action navbar items, dont clear navigation stack when selected.
MODIFY
WalletWasabi.Fluent/ViewModels/NavBar/NavBarItemViewModel.cs
WalletWasabi.Fluent/ViewModels/NavBar/NavBarItemViewModel.cs
@@ -17,9 +17,10 @@ namespace WalletWasabi.Fluent.ViewModels.NavBar
[AutoNotify] private bool _isExpanded;
[AutoNotify] private bool _isEnabled = true;
- protected NavBarItemViewModel()
+ protected NavBarItemViewModel(NavigationMode defaultNavigationMode = NavigationMode.Clear)
{
SelectionMode = NavBarItemSelectionMode.Selected;
+
OpenCommand = ReactiveCommand.Create(
() =>
{
@@ -29,7 +30,7 @@ namespace WalletWasabi.Fluent.ViewModels.NavBar
}
else
{
- Navigate().To(this, NavigationMode.Clear);
+ Navigate().To(this, defaultNavigationMode);
}
});
}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Actions/AdvancedWalletActionViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Actions/AdvancedWalletActionViewModel.cs
using WalletWasabi.Fluent.ViewModels.NavBar;
+using WalletWasabi.Fluent.ViewModels.Navigation;
namespace WalletWasabi.Fluent.ViewModels.Wallets.Actions
{
@@ -11,7 +12,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Actions
NavigationTarget = NavigationTarget.HomeScreen)]
public partial class AdvancedWalletActionViewModel : NavBarItemViewModel
{
- public AdvancedWalletActionViewModel(WalletViewModelBase wallet)
+ public AdvancedWalletActionViewModel(WalletViewModelBase wallet) : base(NavigationMode.Normal)
{
Title = "Advanced";
}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Actions/CoinJoinWalletActionViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Actions/CoinJoinWalletActionViewModel.cs
using WalletWasabi.Fluent.ViewModels.NavBar;
+using WalletWasabi.Fluent.ViewModels.Navigation;
namespace WalletWasabi.Fluent.ViewModels.Wallets.Actions
{
@@ -11,7 +12,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Actions
NavigationTarget = NavigationTarget.HomeScreen)]
public partial class CoinJoinWalletActionViewModel : NavBarItemViewModel
{
- public CoinJoinWalletActionViewModel(WalletViewModelBase wallet)
+ public CoinJoinWalletActionViewModel(WalletViewModelBase wallet) : base(NavigationMode.Normal)
{
Title = "CoinJoin";
}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Receive/ReceiveViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Receive/ReceiveViewModel.cs
@@ -7,6 +7,7 @@ using ReactiveUI;
using WalletWasabi.Blockchain.Analysis.Clustering;
using WalletWasabi.Blockchain.Keys;
using WalletWasabi.Fluent.ViewModels.NavBar;
+using WalletWasabi.Fluent.ViewModels.Navigation;
using WalletWasabi.Stores;
using WalletWasabi.Wallets;
@@ -25,7 +26,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Receive
[AutoNotify] private HashSet<string> _suggestions;
[AutoNotify] private bool _isExistingAddressesButtonVisible;
- public ReceiveViewModel(WalletViewModelBase wallet, WalletManager walletManager, BitcoinStore bitcoinStore)
+ public ReceiveViewModel(WalletViewModelBase wallet, WalletManager walletManager, BitcoinStore bitcoinStore) : base(NavigationMode.Normal)
{
SelectionMode = NavBarItemSelectionMode.Button;
WasabiWallet = wallet.Wallet;

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
@@ -22,6 +22,7 @@ using WalletWasabi.Fluent.Model;
using WalletWasabi.Fluent.Validation;
using WalletWasabi.Fluent.ViewModels.Dialogs;
using WalletWasabi.Fluent.ViewModels.NavBar;
+using WalletWasabi.Fluent.ViewModels.Navigation;
using WalletWasabi.Gui.Converters;
using WalletWasabi.Helpers;
using WalletWasabi.Logging;
@@ -61,7 +62,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
private bool _updatingCurrentValue;
private double _lastXAxisCurrentValue;
- public SendViewModel(WalletViewModel walletVm, TransactionBroadcaster broadcaster)
+ public SendViewModel(WalletViewModel walletVm, TransactionBroadcaster broadcaster) : base(NavigationMode.Normal)
{
_to = "";
_owner = walletVm;

wallet action navbar items, dont clear navigation stack when selected.