-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Extended Sample operation to support a default value #1457
Conversation
Generated by 🚫 Danger |
Let me think about this suggestion. |
This is kinda interesting actually. Since this is purely additive there’s no real issue with adding this. The only issue I’m seeing here is that it’s diverging from ReactiveX and from the original usage of sample (turning into something like an interval withLatestFrom). Still could be an interesting addition 🤔🤔🤔 hard to say |
@kzaher any further thoughts? |
I still find this to be a good addition. More specifically, it would be quite hard accomplishing this behavior by combining other operators in RxSwift. @aspitz any chance you'd be willing to bring this up-to-date to the latest standards or the repo? Otherwise, I can find someone else to take over this code. |
I can fix this up :) |
Awesome :) @aspitz-intrepid |
… the event that there were no new elements between sampler ticks
… the event that there were no new elements between sampler ticks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you! Just a few quick notes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Final nitpick and we can merge this. Thank you :)
Thank you ! @aspitz |
Added the ability to set a default value for the sampler to return in the event that there were no new elements between sampler ticks