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

Add untilEvent overload for AndroidLifecycleScopeProvider#from #107

Merged
merged 4 commits into from
Oct 10, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ public static AndroidLifecycleScopeProvider from(LifecycleOwner owner) {
* @param untilEvent the event until the scope is valid.
* @return a {@link AndroidLifecycleScopeProvider} against this owner.
*/
public static AndroidLifecycleScopeProvider from(LifecycleOwner owner,
Lifecycle.Event untilEvent) {
public static AndroidLifecycleScopeProvider from(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more nit - if they start on a new line, let's make each of them a separate line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like this?

public static AndroidLifecycleScopeProvider from(
          LifecycleOwner owner, 
          Lifecycle.Event untilEvent) {

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

LifecycleOwner owner, Lifecycle.Event untilEvent) {
return from(owner.getLifecycle(), untilEvent);
}

Expand All @@ -95,7 +95,8 @@ public static AndroidLifecycleScopeProvider from(Lifecycle lifecycle) {
* @param untilEvent the event until the scope is valid.
* @return a {@link AndroidLifecycleScopeProvider} against this lifecycle.
*/
public static AndroidLifecycleScopeProvider from(Lifecycle lifecycle, Lifecycle.Event untilEvent) {
public static AndroidLifecycleScopeProvider from(
Lifecycle lifecycle, Lifecycle.Event untilEvent) {
return new AndroidLifecycleScopeProvider(lifecycle, untilEvent);
}

Expand Down