-
Notifications
You must be signed in to change notification settings - Fork 226
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
Add kotlin module #47
Conversation
These are generated by the IDE for inferred nullability
@0legg would be super curious to get your thoughts on this. |
LGTM, the only thing I have add to it — have you tried Spek for unit tests? |
.autoDisposeWith(scopeMaybe) | ||
.subscribe(o) | ||
|
||
o.assertValue { v -> v == "Hello" } |
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.
You can use it
for brevity; while it's better to have named lambda parameters for more complicated logic, oneliner will look nicer with it
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.
Good point - 2e047aa
Forgot this makes when
blocks with instance checks really pretty.
return Function {
when (it) {
is Start -> End()
is End -> throw LifecycleEndedException()
}
}
Heh, so I actually tried spek with this, but every time I try spek something seems to go stupidly wrong. It seems super unreliable, either with its build setup or just plain not working (exception thrown above is considered successful ¯\_(ツ)_/¯). I get a totally different error when trying to run from the command line too |
Resolves #7
This tacks on convenience extension functions to RxJava types, such that you can just do this:
myObservable .doWhatever() .autoDisposeWith(this) .subscribe()
Did some opportunistic project house cleaning as well