bug(windows): add a argument to "handle check" events for "manual" or "automatic"
- Dominant language
- Pascal
- Stars
- 534
- Forks
- 143
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 113
Description
If `TRemoteUpdateCheck` was created with `FForce` set to true it skips the check for the last update time and checks immediately.
The HTTP request sets the `automatic` or `manual` check based on this flag. https://github.com/keymanapp/keyman/blob/0e5f2adab2efd7e3bd99e7882afae39bab6c547b/windows/src/desktop/kmshell/main/Keyman.System.RemoteUpdateCheck.pas#L162-L165
The trouble is the Keyman app timer in `keyman\app\windows\src\engine\keyman\UfrmKeyman7Main.pas` uses `kmshell -buc` it should not really have been calling `HandleCheck` on a 5 minute timer. Currently the timer reads the registery and does the 7 day check before calling `HandleCheck` via `-buc` command line switch. However, this means that the `manual` update check is set when it was really an automatic updated check.
Note this will also help prepare for a new feature to track what type of check update request is being made for statistical purposes. #15421.
Background History:
The `HandleCheck` event for the state machine was designed to be a `check now`. In the first iteration it was going to be called by a scheduler of some type like Windows Scheduler.
The `HandleKmShell` would always also take the opportunity to check for an update if it had been less than 7 days. Due to some tweaking of the delivery of the Windows Update, `HandleCheck` was changed to be called on a interal timer in Keyman.exe every 5 min. `HandleKmShell` is not appropriate here as that event should only be called on a start or kmshell execution. Adding a argument to HandleCheck with the type of update will be the way forward.
Contributor guide
Assessment
This issue has not been assessed yet.