Cancel previous commit requests if selected ref changes
Open
bug
help wanted
- Dominant language
- F#
- Stars
- 34
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
See this TODO comment: https://github.com/ForNeVeR/Fenrir/blob/f091f85b8b09cb1813cfbeb8bcbdf2870e46ad36/Fenrir/Ui/CommitsViewModel.fs#L36-L49
Consider this scenario:
1. User selects a ref named `ref1`
2. This code block starts asynchronous load of commits for `ref1`
3. User quickly changes their selection to a ref named `ref2`
4. This code block starts another asynchronous load
5. Load for `ref2` my finish earlier than for `ref1`, so data for `ref2` will be loaded into the commit control
6. And later, when the asynchronous load task for `ref1` is finished, it will override the contents of the commit control, which is bad!
Contributor guide
Assessment
This issue has not been assessed yet.