mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
Remove unreachable code
This commit is contained in:
@@ -101,8 +101,7 @@ public class VirtualDesktopHelper
|
|||||||
if (virtualDesktopKey is not null)
|
if (virtualDesktopKey is not null)
|
||||||
{
|
{
|
||||||
var allDeskValue = (byte[]?)virtualDesktopKey.GetValue("VirtualDesktopIDs", null) ?? [];
|
var allDeskValue = (byte[]?)virtualDesktopKey.GetValue("VirtualDesktopIDs", null) ?? [];
|
||||||
if (allDeskValue is not null)
|
|
||||||
{
|
|
||||||
// We clear only, if we can read from registry. Otherwise, we keep the existing values.
|
// We clear only, if we can read from registry. Otherwise, we keep the existing values.
|
||||||
_availableDesktops.Clear();
|
_availableDesktops.Clear();
|
||||||
|
|
||||||
@@ -115,11 +114,6 @@ public class VirtualDesktopHelper
|
|||||||
_availableDesktops.Add(new Guid(guidArray));
|
_availableDesktops.Add(new Guid(guidArray));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
ExtensionHost.LogMessage(new LogMessage() { Message = $"VirtualDesktopHelper.UpdateDesktopList() failed to read the list of existing desktops form registry." });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Guid for current desktop
|
// Guid for current desktop
|
||||||
var virtualDesktopsKeyName = _isWindowsEleven ? registryExplorerVirtualDesktops : registrySessionVirtualDesktops;
|
var virtualDesktopsKeyName = _isWindowsEleven ? registryExplorerVirtualDesktops : registrySessionVirtualDesktops;
|
||||||
|
|||||||
Reference in New Issue
Block a user