Skip to content

Instantly share code, notes, and snippets.

@SUPERCILEX
Last active October 4, 2017 03:40
Show Gist options
  • Save SUPERCILEX/14999b4fe7c85a7e237789147adcab55 to your computer and use it in GitHub Desktop.
Save SUPERCILEX/14999b4fe7c85a7e237789147adcab55 to your computer and use it in GitHub Desktop.
FirebaseFirestore.getInstance()
.collection("teams")
.addSnapshotListener { snapshot: QuerySnapshot?, e: FirebaseFirestoreException? ->
if (e != null) {
FirebaseCrash.report(e)
return@addSnapshotListener
}
snapshot!! // The parameters follow a XOR pattern so this is perfectly safe
// Do stuff
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment