Fix tabs added too many times bug
MODIFY
WalletWasabi.Gui/Shell/Commands/HelpCommands.cs
WalletWasabi.Gui/Shell/Commands/HelpCommands.cs
@@ -19,37 +19,37 @@ namespace WalletWasabi.Gui.Shell.Commands
AboutCommand = new CommandDefinition(
"About", null, ReactiveCommand.Create(() =>
{
- IoC.Get<IShell>().AddDocument(new AboutViewModel());
+ IoC.Get<IShell>().AddOrSelectDocument<AboutViewModel>(new AboutViewModel());
}));
CustomerSupportCommand = new CommandDefinition(
"Customer Support", null, ReactiveCommand.Create(() =>
{
- IoC.Get<IShell>().AddDocument(new CustomerSupportViewModel());
+ IoC.Get<IShell>().AddOrSelectDocument<CustomerSupportViewModel>(new CustomerSupportViewModel());
}));
ReportBugCommand = new CommandDefinition(
"Report Bug", null, ReactiveCommand.Create(() =>
{
- IoC.Get<IShell>().AddDocument(new ReportBugViewModel());
+ IoC.Get<IShell>().AddOrSelectDocument<ReportBugViewModel>(new ReportBugViewModel());
}));
PrivacyPolicyCommand = new CommandDefinition(
"Privacy Policy", null, ReactiveCommand.Create(() =>
{
- IoC.Get<IShell>().AddDocument(new PrivacyPolicyViewModel());
+ IoC.Get<IShell>().AddOrSelectDocument<PrivacyPolicyViewModel>(new PrivacyPolicyViewModel());
}));
TermsAndConditionsCommand = new CommandDefinition(
"Terms and Conditions", null, ReactiveCommand.Create(() =>
{
- IoC.Get<IShell>().AddDocument(new TermsAndConditionsViewModel());
+ IoC.Get<IShell>().AddOrSelectDocument<TermsAndConditionsViewModel>(new TermsAndConditionsViewModel());
}));
LegalIssuesCommand = new CommandDefinition(
"Legal Issues", null, ReactiveCommand.Create(() =>
{
- IoC.Get<IShell>().AddDocument(new LegalIssuesViewModel());
+ IoC.Get<IShell>().AddOrSelectDocument<LegalIssuesViewModel>(new LegalIssuesViewModel());
}));
DevToolsCommand = new CommandDefinition("Dev Tools", null, ReactiveCommand.Create(() =>

MODIFY
WalletWasabi.Gui/Tabs/WalletManager/GenerateWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/GenerateWalletViewModel.cs
@@ -96,17 +96,17 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
public void OnTermsClicked()
{
- IoC.Get<IShell>().AddDocument(new TermsAndConditionsViewModel());
+ IoC.Get<IShell>().AddOrSelectDocument<TermsAndConditionsViewModel>(new TermsAndConditionsViewModel());
}
public void OnPrivacyClicked()
{
- IoC.Get<IShell>().AddDocument(new PrivacyPolicyViewModel());
+ IoC.Get<IShell>().AddOrSelectDocument<PrivacyPolicyViewModel>(new PrivacyPolicyViewModel());
}
public void OnLegalClicked()
{
- IoC.Get<IShell>().AddDocument(new LegalIssuesViewModel());
+ IoC.Get<IShell>().AddOrSelectDocument<LegalIssuesViewModel>(new LegalIssuesViewModel());
}
public override void OnCategorySelected()

MODIFY
WalletWasabi.Gui/Tabs/WalletManager/RecoverWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/RecoverWalletViewModel.cs
@@ -97,17 +97,17 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
public void OnTermsClicked()
{
- IoC.Get<IShell>().AddDocument(new TermsAndConditionsViewModel());
+ IoC.Get<IShell>().AddOrSelectDocument<TermsAndConditionsViewModel>(new TermsAndConditionsViewModel());
}
public void OnPrivacyClicked()
{
- IoC.Get<IShell>().AddDocument(new PrivacyPolicyViewModel());
+ IoC.Get<IShell>().AddOrSelectDocument<PrivacyPolicyViewModel>(new PrivacyPolicyViewModel());
}
public void OnLegalClicked()
{
- IoC.Get<IShell>().AddDocument(new LegalIssuesViewModel());
+ IoC.Get<IShell>().AddOrSelectDocument<LegalIssuesViewModel>(new LegalIssuesViewModel());
}
public override void OnCategorySelected()

Fix tabs added too many times bug