Skip to content
This repository has been archived by the owner on Aug 13, 2020. It is now read-only.

Commit

Permalink
Added missing builder method to specify a loader id.
Browse files Browse the repository at this point in the history
  • Loading branch information
d4rken committed Mar 2, 2018
1 parent 4511c40 commit eefa558
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions library/src/main/java/eu/darken/ommvplib/base/OMMVPLib.java
Expand Up @@ -16,8 +16,8 @@ public class OMMVPLib<ViewT extends Presenter.View, PresenterT extends Presenter
private final LoaderFactory.Callback<ViewT, PresenterT> callback;
private final InstanceStatePublisher statePublisher;
private final LifecycleOwner lifecycleOwner;
private PresenterT presenter;
private Bundle savedState;
@Nullable private PresenterT presenter;
@Nullable private Bundle savedState;

OMMVPLib(Builder<ViewT, PresenterT> builder) {
this.lifecycleOwner = builder.lifecycleOwner;
Expand Down Expand Up @@ -91,6 +91,11 @@ public static class Builder<ViewT extends Presenter.View & LifecycleOwner, Prese
private LoaderFactory<ViewT, PresenterT> loaderFactory;
private InstanceStatePublisher statePublisher;

public Builder<ViewT, PresenterT> loaderId(int loaderId) {
this.loaderId = loaderId;
return this;
}

/**
* If you want the presenter to be able to store data via {@link Activity#onSaveInstanceState(Bundle)} then you need to call this.
*
Expand Down

0 comments on commit eefa558

Please sign in to comment.