Suppose I have a repository class whose methods are invoked from multiple view models in different fragments and each method of the repository do async Firebase requests using addOnSuccessListener to handle each one. Will the effect of doing this be create a tons of listeners that will run indefinitely? If so, how can I handle this? I can pass the activity instance in the repository and define a lifecycle for them, but what will happen if I will do many requests using that repository?
Aucun commentaire:
Enregistrer un commentaire