Firestore how to define last child change event

I tried this

ref.limit(to: 1).addSnapshotListener { (snapshot, error) in
}

but it doesn't get called every time last child is added or updated any help is appreciated