From 3d63d499da30c31dd67f18488b4b8af989410a1f Mon Sep 17 00:00:00 2001 From: Dave Rayment Date: Mon, 24 Nov 2025 01:12:54 +0000 Subject: [PATCH] [Awake] Fix issue with timed mode not expiring correctly (#43785) ## Summary of the Pull Request Resolves an issue with the timed mode's expiry not completing correctly. ## PR Checklist - [x] Closes: #43775 - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments This was because of my recent change to the timed mode. The `Subscribe` method on the `Observable` interval accidentally wired the completion logic to the **Error** handler instead of the **Completion** handler because of the use of a discard `_` instead of an empty parameter list `()`. As a result of the incorrect overload being called, Awake stayed in the Timed state despite the timer reaching zero. ## Validation Steps Performed Confirmed that the timed mode times out and exits upon expiry. --- src/modules/awake/Awake/Core/Manager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/awake/Awake/Core/Manager.cs b/src/modules/awake/Awake/Core/Manager.cs index ad4c417b31..c6aa1c2efb 100644 --- a/src/modules/awake/Awake/Core/Manager.cs +++ b/src/modules/awake/Awake/Core/Manager.cs @@ -350,7 +350,7 @@ namespace Awake.Core TrayHelper.TimedIcon, TrayIconAction.Update); }, - _ => HandleTimerCompletion("timed"), + () => HandleTimerCompletion("timed"), _tokenSource.Token); }