-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Describe the problem:
Currently there are no Lint checks on whether someone has called .startListening() / .stopListening() methods when using a FirestoreRecyclerAdapter, or .setLifecyclerOwner() when using FirestoreRecyclerOptions.Builder. That way the RecyclerView using that adapter will never get any UI updates on items from real-time changes.
Steps to reproduce:
Create a FirestoreRecyclerAdapter and do not call .startListening() / .stopListening() methods.
Alternatively, use FirestoreRecyclerOptions.Builder and do not call .setLifecycleOwner().
Observed Results:
RecyclerView using the adapter will not get any UI updates from real-time changes without any obvious reason, for those who haven't called .startListening() or .setLifecycleOwner().
Expected Results:
Expected a Lint check in place, to inform on whether there is a missing call on .startListening() or .setLifecycleOwner() for FirestoreRecyclerOptions.Builder.
Relevant Code:
I have prepared a relevant PR: #1340