Map of correct settings
MODIFY
WalletWasabi.Fluent/ViewModels/SearchBar/Sources/SettingsSource.cs
WalletWasabi.Fluent/ViewModels/SearchBar/Sources/SettingsSource.cs
@@ -4,6 +4,7 @@ using DynamicData;
using WalletWasabi.Fluent.ViewModels.SearchBar.Patterns;
using WalletWasabi.Fluent.ViewModels.SearchBar.SearchItem;
using WalletWasabi.Fluent.ViewModels.SearchBar.Settings;
+using WalletWasabi.Fluent.ViewModels.Settings;
namespace WalletWasabi.Fluent.ViewModels.SearchBar.Sources;
@@ -15,18 +16,20 @@ public class SettingsSource : ISearchItemSource
private static IEnumerable<ISearchItem> GetSettingsItems()
{
+ var torSettings = new TorSettingsTabViewModel();
+ var btSettings = new BitcoinTabSettingsViewModel();
+
return new ISearchItem[]
{
new NonActionableSearchItem(new DarkThemeSetting(Services.UiConfig), "Dark theme", "Appearance", new List<string>(), "nav_settings_regular"){ IsDefault = false},
new NonActionableSearchItem(new Setting<UiConfig, bool>(Services.UiConfig, b => b.Autocopy), "Autocopy Bitcoin address", "Settings", new List<string>(), "nav_settings_regular") { IsDefault = false },
new NonActionableSearchItem(new Setting<UiConfig, bool>(Services.UiConfig, b => b.AutoPaste), "Autopaste Bitcoin address", "Settings", new List<string>(), "nav_settings_regular") { IsDefault = false },
- new NonActionableSearchItem(new Setting<UiConfig, bool>(Services.UiConfig, b => b.HideOnClose), "Hide on close", "Settings", new List<string>(), "nav_settings_regular") { IsDefault = false },
+ new NonActionableSearchItem(new Setting<UiConfig, bool>(Services.UiConfig, b => b.HideOnClose), "Run in background when closed", "Settings", new List<string>() { "hide" }, "nav_settings_regular") { IsDefault = false },
new NonActionableSearchItem(new Setting<UiConfig, bool>(Services.UiConfig, b => b.RunOnSystemStartup), "Run on system startup", "Settings", new List<string>(), "nav_settings_regular") { IsDefault = false },
- new NonActionableSearchItem(new Setting<Config, bool>(Services.Config, b => b.UseTor, true), "Use Tor", "Settings", new List<string>(), "nav_settings_regular") { IsDefault = false },
- new NonActionableSearchItem(new Setting<Config, bool>(Services.Config, b => b.TerminateTorOnExit, true), "Terminate Tor on exit", "Settings", new List<string>(), "nav_settings_regular") { IsDefault = false },
- new NonActionableSearchItem(new Setting<Config, bool>(Services.Config, b => b.StartLocalBitcoinCoreOnStartup), "Start local Bitcoin core on startup", "Settings", new List<string>(), "nav_settings_regular") { IsDefault = false },
- new NonActionableSearchItem(new Setting<Config, bool>(Services.Config, b => b.StopLocalBitcoinCoreOnShutdown), "Start local Bitcoin core on shutdown", "Settings", new List<string>(), "nav_settings_regular") { IsDefault = false },
- new NonActionableSearchItem(new Setting<Config, bool>(Services.Config, b => b.JsonRpcServerEnabled), "Enable JSON-RPC Server", "Settings", new List<string>(), "nav_settings_regular") { IsDefault = false },
+ new NonActionableSearchItem(new Setting<TorSettingsTabViewModel, bool>(torSettings, b => b.UseTor, true), "Use Tor", "Settings", new List<string>(), "nav_settings_regular") { IsDefault = false },
+ new NonActionableSearchItem(new Setting<TorSettingsTabViewModel, bool>(torSettings, b => b.TerminateTorOnExit, true), "Terminate Tor on exit", "Settings", new List<string>(), "nav_settings_regular") { IsDefault = false },
+ new NonActionableSearchItem(new Setting<BitcoinTabSettingsViewModel, bool>(btSettings, b => b.StartLocalBitcoinCoreOnStartup), "Start local Bitcoin core on startup", "Settings", new List<string>(), "nav_settings_regular") { IsDefault = false },
+ new NonActionableSearchItem(new Setting<BitcoinTabSettingsViewModel, bool>(btSettings, b => b.StopLocalBitcoinCoreOnShutdown), "Stop local Bitcoin core on shutdown", "Settings", new List<string>(), "nav_settings_regular") { IsDefault = false },
};
}
}
\ No newline at end of file

ADD
WalletWasabi.Fluent/ViewModels/Settings/SaveConfigMessage.cs
+namespace WalletWasabi.Fluent.ViewModels.Settings;
+
+public class SaveConfigMessage
+{
+}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/ViewModels/Settings/SettingsTabViewModelBase.cs
WalletWasabi.Fluent/ViewModels/Settings/SettingsTabViewModelBase.cs
@@ -14,6 +14,7 @@ public abstract class SettingsTabViewModelBase : RoutableViewModel
{
ConfigOnOpen = new Config(Services.Config.FilePath);
ConfigOnOpen.LoadFile();
+ MessageBus.Current.Listen<SaveConfigMessage>();
}
public static event EventHandler<RestartNeededEventArgs>? RestartNeeded;

Map of correct settings