-
Notifications
You must be signed in to change notification settings - Fork 134
Closed
Description
Describe the bug
Debounce(immediate: true) does not work with a default timer. When a timer is created, IsRepeating is set to true by default. This breaks the logic of Debounce when immediate: true. Setting IsRepeating to false on the timer fixes this issue.
Steps to reproduce
- Create a
DispatcherQueueTimerusingDispatcherQueue.GetForCurrentThread().CreateTimer() - Use
Debounce()on that timer withimmediate: true - The action is only triggered once and never again.
Expected behavior
Subsequent actions should trigger once the timer expires just like without the immediate flag.
Windows Build Number
- Windows 10 1809 (Build 17763)
- Windows 10 1903 (Build 18362)
- Windows 10 1909 (Build 18363)
- Windows 10 2004 (Build 19041)
- Windows 10 20H2 (Build 19042)
- Windows 10 21H1 (Build 19043)
- Windows 11 21H2 (Build 22000)
- Other (specify)
App minimum and target SDK version
- Windows 10, version 1809 (Build 17763)
- Windows 10, version 1903 (Build 18362)
- Windows 10, version 1909 (Build 18363)
- Windows 10, version 2004 (Build 19041)
- Other (specify)
Visual Studio Version
2022
Help us help you
Yes, I'd like to be assigned to work on this item.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels