Skip to content
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 Actions.elements does not emit values #231

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Econa77
Copy link
Member

@Econa77 Econa77 commented Apr 13, 2021

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?

@rxswiftcommunity
Copy link

Warnings
⚠️ 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 🚫 dangerJS

@ashfurrow
Copy link
Member

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 👍

@Econa77
Copy link
Member Author

Econa77 commented Apr 14, 2021

@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.

@RobertDresler
Copy link

Any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Action.elements does not emit item for a inflight request
3 participants