Skip to content

Commit e40d4d9

Browse files
committed
refactor
1 parent ba006f0 commit e40d4d9

4 files changed

Lines changed: 12 additions & 11 deletions

File tree

Project-Aurora/Project-Aurora/Devices/Corsair/CorsairDevice.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class CorsairDevice : DefaultDevice
2020

2121
protected override string DeviceInfo => string.Join(", ", deviceInfos.Select(d => d.Model));
2222

23-
private readonly List<CorsairDeviceInfo> deviceInfos = new List<CorsairDeviceInfo>();
23+
private readonly List<CorsairDeviceInfo> deviceInfos = new();
2424

2525
public override bool Initialize()
2626
{

Project-Aurora/Project-Aurora/Devices/DeviceKeys.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,7 @@ public enum DeviceKeys
14271427
/// Peripheral DPI
14281428
/// </summary>
14291429
[Description("PERIPHERAL_DPI")]
1430-
PERIPHERAL_DPI = 237,
1430+
PERIPHERAL_DPI = 237,
14311431

14321432
/// <summary>
14331433
/// Additional Light 33

Project-Aurora/Project-Aurora/Devices/YeeLight/YeeLightDevice.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using System.Text;
1111
using System.Threading;
1212
using System.Threading.Tasks;
13+
using Aurora.Profiles;
1314
using YeeLightAPI.YeeLightDeviceLocator;
1415
using YeeLightAPI.YeeLightConstants;
1516
using YeeLightAPI.YeeLightExceptions;
@@ -132,7 +133,7 @@ private bool TryUpdate(IReadOnlyDictionary<DeviceKeys, Color> keyColors)
132133
return ProceedSameColor(targetColor);
133134
_previousColor = targetColor;
134135

135-
if (IsWhiteTone(targetColor))
136+
if (IsWhiteTone(targetColor)) // && Global.LightingStateManager.GetCurrentProfile() == Global.LightingStateManager.DesktopProfile
136137
{
137138
return ProceedDifferentWhiteColor(targetColor);
138139
}

Project-Aurora/Project-Aurora/Profiles/LightingStateManager.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,20 @@ void OnDeserialized(StreamingContext context)
4141

4242
public class LightingStateManager : ObjectSettings<ProfilesManagerSettings>, IInit
4343
{
44-
public Dictionary<string, ILightEvent> Events { get; private set; } = new Dictionary<string, ILightEvent> { { "desktop", new Desktop.Desktop() } };
44+
public Dictionary<string, ILightEvent> Events { get; } = new() { { "desktop", new Desktop.Desktop() } };
4545

46-
public Desktop.Desktop DesktopProfile { get { return (Desktop.Desktop)Events["desktop"]; } }
46+
public Desktop.Desktop DesktopProfile => (Desktop.Desktop)Events["desktop"];
4747

48-
private List<ILightEvent> StartedEvents = new List<ILightEvent>();
49-
private List<ILightEvent> UpdatedEvents = new List<ILightEvent>();
48+
private List<ILightEvent> StartedEvents = new();
49+
private List<ILightEvent> UpdatedEvents = new();
5050

51-
private Dictionary<string, string> EventProcesses { get; set; } = new Dictionary<string, string>();
51+
private Dictionary<string, string> EventProcesses { get; } = new();
5252

53-
private Dictionary<string, string> EventTitles { get; set; } = new Dictionary<string, string>();
53+
private Dictionary<string, string> EventTitles { get; } = new();
5454

55-
private Dictionary<string, string> EventAppIDs { get; set; } = new Dictionary<string, string>();
55+
private Dictionary<string, string> EventAppIDs { get; } = new();
5656

57-
public Dictionary<Type, LayerHandlerMeta> LayerHandlers { get; private set; } = new Dictionary<Type, LayerHandlerMeta>();
57+
public Dictionary<Type, LayerHandlerMeta> LayerHandlers { get; } = new();
5858

5959
public string AdditionalProfilesPath = Path.Combine(Global.AppDataDirectory, "AdditionalProfiles");
6060

0 commit comments

Comments
 (0)