Open last active tab
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/WalletViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/WalletViewModel.cs
@@ -80,20 +80,33 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
advancedAction.Items.Add(infoTab);
advancedAction.Items.Add(buildTab);
- // Open and select tabs.
+ // Open tabs.
sendTab?.DisplayActionTab();
- if (receiveDominant)
- {
+ receiveTab.DisplayActionTab();
coinjoinTab.DisplayActionTab();
historyTab.DisplayActionTab();
+
+ // Select tab
+ if (receiveDominant || global.UiConfig.LastActiveTab == receiveTab.GetType().Name)
+ {
receiveTab.DisplayActionTab(); // So receive should be shown to the user.
}
- else
+ else if (global.UiConfig.LastActiveTab == sendTab?.GetType().Name)
+ {
+ sendTab.DisplayActionTab(); // So send should be shown to the user.
+ }
+ else if (global.UiConfig.LastActiveTab == buildTab.GetType().Name)
+ {
+ buildTab.DisplayActionTab(); // So build should be shown to the user.
+ }
+ else if (global.UiConfig.LastActiveTab == historyTab.GetType().Name)
{
- receiveTab.DisplayActionTab();
- coinjoinTab.DisplayActionTab();
historyTab.DisplayActionTab(); // So history should be shown to the user.
}
+ else
+ {
+ coinjoinTab.DisplayActionTab(); // So coinjoin should be shown to the user.
+ }
LurkingWifeModeCommand = ReactiveCommand.CreateFromTask(async () =>
{

MODIFY
WalletWasabi.Gui/MainWindow.xaml.cs
WalletWasabi.Gui/MainWindow.xaml.cs
@@ -108,6 +108,7 @@ namespace WalletWasabi.Gui
Global.UiConfig.WindowState = WindowState;
Global.UiConfig.Width = Width;
Global.UiConfig.Height = Height;
+ Global.UiConfig.LastActiveTab = IoC.Get<IShell>().SelectedDocument?.GetType().Name;
await Global.UiConfig.ToFileAsync();
Logger.LogInfo($"{nameof(Global.UiConfig)} is saved.");
}

MODIFY
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
@@ -637,7 +637,7 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
// Open Wallet Explorer tabs
if (Global.WalletService.Coins.Any())
{
- // If already have coins then open with History tab first.
+ // If already have coins then open the last active tab first.
IoC.Get<WalletExplorerViewModel>().OpenWallet(Global.WalletService, receiveDominant: false);
}
else // Else open with Receive tab first.

MODIFY
WalletWasabi.Gui/UiConfig.cs
WalletWasabi.Gui/UiConfig.cs
@@ -47,6 +47,10 @@ namespace WalletWasabi.Gui
[JsonProperty(PropertyName = "FeeDisplayFormat", DefaultValueHandling = DefaultValueHandling.Populate)]
public int FeeDisplayFormat { get; internal set; }
+ [DefaultValue("")]
+ [JsonProperty(PropertyName = "LastActiveTab", DefaultValueHandling = DefaultValueHandling.Populate)]
+ public string LastActiveTab { get; internal set; }
+
[DefaultValue(true)]
[JsonProperty(PropertyName = "Autocopy", DefaultValueHandling = DefaultValueHandling.Populate)]
public bool Autocopy

Open last active tab