I searched and implemented Jetpack compose samples. I implemented the below navigation codelab sample too.
https://github.com/googlecodelabs/android-compose-codelabs/tree/main/NavigationCodelab
I have a problem here. When i clicked something at the tab, we navigated to a composable and pıut that composable to the stack. When i clicked back, the previous composeable is shown.
In my navigation component app which is not using jetpack compose, for example say that there are 3 tabs : Home, Favorite, Settings. I clicked Favorite, Settings, Home, Favorite, Settings. When i pressed back button, home fragment is shown. Then, when i pressed back button again, app is closed.
In my compose navigation app, i do the same action(clicked Favorite, Settings, Home, Favorite, Settings). In order to close the app, i need to press back button 5 times. This is my problem. I want to have the same behaviour with navigation component. I want that when i clicked back button starting destination fragment should be shown, then, when i clicked back button again, app should be closed. How to do that ?