-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: several ReactiveCommand bugs #1534
Conversation
@kentcb, |
I've merged this locally and can confirm this fixes #1476. 👍 |
a2c0edb
to
530d409
Compare
I meant to link to the related Rx issue. |
Thanks for confirming @Qonstrukt! I've rebased the branch on top of your Xamarin.Android fixes and will hopefully get it merged a bit later today. Reviews welcome! |
f6d7ab8
to
da42ed1
Compare
da42ed1
to
abb841d
Compare
Changes Unknown when pulling abb841d on kentcb:invoke-command into ** on reactiveui:develop**. |
Thanks for the review @olevett |
fix: several ReactiveCommand bugs (#1534) * Use custom WithLatestFrom implementation that bypasses unexpected behavior in the operator provided by Rx, thereby fixing InvokeCommand scenarios in which the source is cold or primed. * Support multiple, in-flight executions correctly. * Correctly handle disposal of an in-flight execution.
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
fixes
What is the current behavior? (You can also link to an open issue here)
InvokeCommand
relies on Rx'sWithLatestFrom
operator, which is...weird. It subscribes to first observable first, and then the second, which can result in missing values.What is the new behavior (if this is a feature change)?
InvokeCommand
relies on our own customWithLatestFromFixed
operator, which publishes the source observable so values aren't missed.IsExecuting
andCanExecute
report intuitive values.What might this PR break?
Nothing - it should fix several scenarios.
Please check if the PR fulfills these requirements
Other information: