My addOnSuccessListener code is being skipped Firestore / Kotlin
I made a function that returns an object built with Firestore document fields but my code in addOnSuccessListener is being skipped (I've checked that with debug and Logs)
It simply jumps from the 'db.collection....' to the end
fun getPostObj(collection : String, document : String, db : FirebaseFirestore) : Post{
val newPostOb = Post()
db.collection(collection).document(document).get().addOnSuccessListener {
newPostOb.title = it.getString("title")
newPostOb.body =...