Refactor SettingsDeepLink.OpenSettings signature

Removed the unused SettingsWindow enum and refactored OpenSettings to accept only the mainExecutableIsOnTheParentFolder parameter. Updated all call sites to match the new method signature, simplifying settings navigation logic.
This commit is contained in:
Yu Leng
2025-12-26 16:30:49 +08:00
parent 92e26496f9
commit e88bae1bac
3 changed files with 3 additions and 8 deletions

View File

@@ -9,12 +9,7 @@ namespace PowerDisplay.Helpers
{
public static class SettingsDeepLink
{
public enum SettingsWindow
{
PowerDisplay,
}
public static void OpenSettings(SettingsWindow window, bool mainExecutableIsOnTheParentFolder)
public static void OpenSettings(bool mainExecutableIsOnTheParentFolder)
{
try
{

View File

@@ -301,7 +301,7 @@ namespace PowerDisplay
{
// mainExecutableIsOnTheParentFolder = true because PowerDisplay is a WinUI 3 app
// deployed in a subfolder (PowerDisplay\) while PowerToys.exe is in the parent folder
SettingsDeepLink.OpenSettings(SettingsDeepLink.SettingsWindow.PowerDisplay, true);
SettingsDeepLink.OpenSettings(true);
}
/// <summary>

View File

@@ -299,7 +299,7 @@ namespace PowerDisplay
// Open PowerDisplay settings in PowerToys Settings UI
// mainExecutableIsOnTheParentFolder = true because PowerDisplay is a WinUI 3 app
// deployed in a subfolder (PowerDisplay\) while PowerToys.exe is in the parent folder
SettingsDeepLink.OpenSettings(SettingsDeepLink.SettingsWindow.PowerDisplay, true);
SettingsDeepLink.OpenSettings(true);
}
/// <summary>