-
Notifications
You must be signed in to change notification settings - Fork 151
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
Actions defaults to enabled=false #63
Comments
Hi @floskel, As the test case indicates, the default value of The initial value let enabledSubject = BehaviorSubject<Bool>(value: false)
enabled = enabledSubject.asObservable()
...
executing = Observable
.of(executionStart.map { _ in true }, executionEnd.map { _ in false })
.merge()
.startWith(false)
Observable
.combineLatest(executing, enabledIf) { !$0 && $1 }
.bindTo(enabledSubject)
.addDisposableTo(disposeBag) However, you're experiencing weird behavior of Action actually. Could you tell me more detail of the situation?
In addition, please push a test case that reproduces this issue to some branch if you could. |
Yes, makes more sense. I will look into replicating the issue. |
I'm also seeing a similar issue with an Action in our codebase after updating from 2.0.0 to 2.1.x, including the current HEAD of the repo... I instrumented the action in question a bit, and here's the debug output I ended up with:
Note that enabled goes to false before we see the .next from inputs, and yet the workFactory is invoked in between the two... I'm not entirely sure where to go from here, but happy to help if I can. |
Worth noting that I do see an element emitted on |
Confirming that 2.2.1 has fixed the issues i experienced. Appreciate the good work! |
I have updated to 2.1.0 recently and im experiencing that some actions not enabled by default.
This means i immediately get an error
notEnabled
, but the work factory seems to execute. Theres never a call back to my subscription on elements.I looked around in the recent changes and this seems peculiar:
I'm not 100% sure whats going on, but it seems to me
_enabledIf
defaults true andenabled
defaults tofalse
?The text was updated successfully, but these errors were encountered: