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

Extract genres registration query to a method #6

Open
paulsmithkc opened this issue Feb 28, 2022 · 2 comments
Open

Extract genres registration query to a method #6

paulsmithkc opened this issue Feb 28, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@paulsmithkc
Copy link
Owner

// observe genres collection
// FIXME: move to a separate method
// FIXME: extract user-visible strings
genresRegistration =
db.collection("genres")
.orderBy("name")
.addSnapshotListener((QuerySnapshot querySnapshot, FirebaseFirestoreException error) -> {
if (error != null) {
Log.e(LOG_TAG, "Error getting genres.", error);
snackbarMessage.postValue("Error getting genres.");
} else if (querySnapshot != null) {
Log.i(LOG_TAG, "Genres updated.");
List<Genre> newGenres = querySnapshot.toObjects(Genre.class);
genres.postValue(newGenres);
}
});

@paulsmithkc paulsmithkc added enhancement New feature or request good first issue Good for newcomers labels Feb 28, 2022
@Turner747
Copy link

I must admit that I am new to GitHub and not entirely sure how to use it properly. I have only ever cloned in the past. I tried to create a pull request but forked instead??

I think I have completed the issue that was raised. But maybe not how you intended. Please feel free to provide feedback as I would like to learn and improve.

@Turner747
Copy link

I messed up so much I didn't even save/push the right code hahaha what an amateur.

@paulsmithkc paulsmithkc removed the good first issue Good for newcomers label Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants