RecyclerView becomes empty after coming back to a destroyed activity
I have a recyclerview that reads from a Firebase database a list of people and displays them on the layout. When I access to the activity for the first time it goes everything as expected, but when I finish the activity with the BackButton and when I try to access again to that activity, the recyclerview becomes empty.
Note that I try to add programmatically the people by using a Listener for a SingleValueEvent.
class myActivity : AppCompatActivity() {
private var index = 0...