Fragment is not getting popped using navigation graph
I am building an app where first time it opens fragment1 to get user details and once user forwards to next fragment2, I am saving the details and setting a boolean variable isUserRegistered to true in SharedPreferences so that when the user opens the app next time, he/she will be directly taken to the fragment2. I am using using navigation graph to handle these things. Following is the code:
//declared at the top in onCreateView() of fragment
val prefs =...