Action
Action copied to clipboard
Fix `Actions.elements` does not emit values
Fixed #216
I encountered a case similar to the issue ( #216 ) and committed testing and a temporary fix. It seems that the values does not emit if the timing to subscribe the elements is after the input.
I don't think this fix is so good, so does anyone have any other ideas?
Warnings | |
---|---|
:warning: | It looks like code was changed without adding anything to the Changelog. If this is a trivial PR that doesn't need a changelog, add #trivial to the PR title or body. |
Generated by :no_entry_sign: dangerJS
It's been a while since I used RxSwift day-to-day... is this a bad solution just because of the .share()
? We can definitely find someone closer to the code than me to review this 👍
@ashfurrow I think the bad solution is an empty subscribe to keep the values emitting.
elements
.subscribe()
.disposed(by: disposeBag)
This is necessary to subscribe to the values at any time, but it difficult to understand why this empty subscribe is needed on code.
Any update?