Skip to content

Commit b0afc7e

Browse files
authored
Store options in FirebaseRecyclerAdapter (#1713)
2 parents 7366dab + c60cb83 commit b0afc7e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

firestore/src/main/java/com/firebase/ui/firestore/FirestoreRecyclerAdapter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ public abstract class FirestoreRecyclerAdapter<T, VH extends RecyclerView.ViewHo
3434
* FirestoreRecyclerOptions} for configuration options.
3535
*/
3636
public FirestoreRecyclerAdapter(@NonNull FirestoreRecyclerOptions<T> options) {
37+
mOptions = options;
3738
mSnapshots = options.getSnapshots();
3839

39-
if (options.getOwner() != null) {
40-
options.getOwner().getLifecycle().addObserver(this);
40+
if (mOptions.getOwner() != null) {
41+
mOptions.getOwner().getLifecycle().addObserver(this);
4142
}
4243
}
4344

0 commit comments

Comments
 (0)