mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-29 00:24:42 +01:00
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:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user