Use PalConfigCommand for the config UI button (partial revert of previous commit)
This commit is contained in:
parent
e1dc8cafd9
commit
0c922c1695
@ -29,7 +29,7 @@ namespace Pal.Client.Commands
|
||||
{ "", _ => Execute() }
|
||||
};
|
||||
|
||||
private void Execute()
|
||||
public void Execute()
|
||||
{
|
||||
if (_configuration.FirstUse)
|
||||
_agreementWindow.IsOpen = true;
|
||||
|
@ -113,6 +113,7 @@ namespace Pal.Client
|
||||
_serviceCollection.AddTransient<RepoVerification>();
|
||||
|
||||
// commands
|
||||
_serviceCollection.AddScoped<PalConfigCommand>();
|
||||
_serviceCollection.AddScoped<ISubCommand, PalConfigCommand>();
|
||||
_serviceCollection.AddScoped<ISubCommand, PalNearCommand>();
|
||||
_serviceCollection.AddScoped<ISubCommand, PalStatsCommand>();
|
||||
|
@ -193,14 +193,7 @@ namespace Pal.Client
|
||||
}
|
||||
|
||||
private void OpenConfigUi()
|
||||
{
|
||||
_rootScope!.ServiceProvider.GetRequiredService<IEnumerable<ISubCommand>>()
|
||||
.SelectMany(cmd => cmd.GetHandlers())
|
||||
.Where(cmd => cmd.Key == "config")
|
||||
.Select(cmd => cmd.Value)
|
||||
.Single()
|
||||
.Invoke("config");
|
||||
}
|
||||
=> _rootScope!.ServiceProvider.GetRequiredService<PalConfigCommand>().Execute();
|
||||
|
||||
private void LanguageChanged(string languageCode)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user