Extract CollapseWallets function.
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/WalletExplorerViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/WalletExplorerViewModel.cs
@@ -71,13 +71,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
InsertWallet(vm);
});
- CollapseAllCommand = ReactiveCommand.Create(() =>
- {
- foreach (var wallet in Wallets)
- {
- wallet.IsExpanded = false;
- }
- });
+ CollapseAllCommand = ReactiveCommand.Create(CollapseWallets);
LurkingWifeModeCommand = ReactiveCommand.Create(() =>
{
@@ -115,6 +109,14 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
.Subscribe(x => shell.AddOrSelectDocument(x));
}
+ private void CollapseWallets()
+ {
+ foreach (var wallet in Wallets)
+ {
+ wallet.IsExpanded = false;
+ }
+ }
+
public override Location DefaultLocation => Location.Right;
public bool IsLurkingWifeMode => _isLurkingWifeMode?.Value ?? false;

Extract CollapseWallets function.