We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I've noticed how this app is using UUID.randomUUID().toString() to generate a document ID and save it on Firestore:
UUID.randomUUID().toString()
make-it-so-android/app/src/main/java/com/example/makeitso/model/service/impl/StorageServiceImpl.kt
Lines 69 to 73 in 40e46da
It would be nice to demonstrate Firestore's auto-generated ids instead:
Firebase.firestore .collection(TASK_COLLECTION) .add(task) .addOnCompleteListener { onResult(it.exception) }
And when reading the tasks, we'd manually set the id:
value?.documentChanges?.forEach { val wasDocumentDeleted = it.type == REMOVED val task = it.document.toObject<Task>().apply { task.id = it.document.id } onDocumentEvent(wasDocumentDeleted, task) }
The text was updated successfully, but these errors were encountered:
Fixed by: #9
Sorry, something went wrong.
marinacoelho
No branches or pull requests
I've noticed how this app is using
UUID.randomUUID().toString()
to generate a document ID and save it on Firestore:make-it-so-android/app/src/main/java/com/example/makeitso/model/service/impl/StorageServiceImpl.kt
Lines 69 to 73 in 40e46da
It would be nice to demonstrate Firestore's auto-generated ids instead:
And when reading the tasks, we'd manually set the id:
The text was updated successfully, but these errors were encountered: