In my navigation drawer layout, I show the user's login in a text view. The later can be changed if he clicks on a button titled "Edit profile" and then submits the corresponding form. That's why I use a snapshot listener, which updates the text view.
Since the navigation drawer layout exists at any execution time, when should I detach the listener?
I could detach it if the user clicks on the button "Log out", but what if he never clicks on it?