File tree 3 files changed +8
-4
lines changed
3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -39,10 +39,13 @@ public static void SetIndefiniteKeepAwake(bool keepDisplayOn = false)
39
39
/// <param name="callback"></param>
40
40
/// <param name="failureCallback"></param>
41
41
/// <param name="keepDisplayOn"></param>
42
- public static void SetIndefiniteKeepAwake ( Action < bool > ? callback , Action ? failureCallback , bool keepDisplayOn = false )
42
+ public static void SetIndefiniteKeepAwake ( Action < bool > callback , Action ? failureCallback , bool keepDisplayOn = false )
43
43
{
44
44
_cts . Cancel ( ) ;
45
45
46
+ callback ??= ( bool success ) => { } ;
47
+ failureCallback ??= ( ) => { } ;
48
+
46
49
try
47
50
{
48
51
if ( _runnerThread != null && ! _runnerThread . IsCanceled )
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ static Awake()
24
24
{
25
25
_log = LogManager . GetCurrentClassLogger ( ) ;
26
26
_cts = new CancellationTokenSource ( ) ;
27
+ _stateQueue = [ ] ;
27
28
StartMonitor ( ) ;
28
29
}
29
30
Original file line number Diff line number Diff line change 20
20
<PackageReadmeFile >README.md</PackageReadmeFile >
21
21
<Company >FrenchyApps42</Company >
22
22
<PackageIcon >logo.png</PackageIcon >
23
- <Version >1.0.2 </Version >
24
- <AssemblyVersion >1.0.2 </AssemblyVersion >
23
+ <Version >1.1.0 </Version >
24
+ <AssemblyVersion >1.1.0 </AssemblyVersion >
25
25
<PackageReleaseNotes >Implement Awake from Microsoft Powertoys</PackageReleaseNotes >
26
- <FileVersion >1.0.2.1 </FileVersion >
26
+ <FileVersion >1.1.0 </FileVersion >
27
27
</PropertyGroup >
28
28
29
29
<ItemGroup >
You can’t perform that action at this time.
0 commit comments