Open kosavsech opened 1 year ago
https://github.com/android/architecture-samples/blob/03d9af0b6a1ab82e450ca7c45f973a119412a9ab/app/src/main/java/com/example/android/architecture/blueprints/todoapp/tasks/TasksScreen.kt#L121-L128 This part of code being legitimately trigger by https://github.com/android/architecture-samples/blob/03d9af0b6a1ab82e450ca7c45f973a119412a9ab/app/src/main/java/com/example/android/architecture/blueprints/todoapp/TodoNavGraph.kt#L96-L100 or https://github.com/android/architecture-samples/blob/03d9af0b6a1ab82e450ca7c45f973a119412a9ab/app/src/main/java/com/example/android/architecture/blueprints/todoapp/TodoNavGraph.kt#L110 But after you can go to task details again and click go back arrow in top bar. https://github.com/android/architecture-samples/blob/03d9af0b6a1ab82e450ca7c45f973a119412a9ab/app/src/main/java/com/example/android/architecture/blueprints/todoapp/taskdetail/TaskDetailScreen.kt#L66-L68 Last snackbar message will be shown again. But this time, in my opinion, because there is copy of route with USER_MESSAGE_ARG in backstack.
USER_MESSAGE_ARG
override fun onDestroyView() { super.onDestroyView() // Dismiss the Snackbar if it's currently shown snackbar?.dismiss() } #
https://github.com/android/architecture-samples/blob/03d9af0b6a1ab82e450ca7c45f973a119412a9ab/app/src/main/java/com/example/android/architecture/blueprints/todoapp/tasks/TasksScreen.kt#L121-L128 This part of code being legitimately trigger by https://github.com/android/architecture-samples/blob/03d9af0b6a1ab82e450ca7c45f973a119412a9ab/app/src/main/java/com/example/android/architecture/blueprints/todoapp/TodoNavGraph.kt#L96-L100 or https://github.com/android/architecture-samples/blob/03d9af0b6a1ab82e450ca7c45f973a119412a9ab/app/src/main/java/com/example/android/architecture/blueprints/todoapp/TodoNavGraph.kt#L110 But after you can go to task details again and click go back arrow in top bar. https://github.com/android/architecture-samples/blob/03d9af0b6a1ab82e450ca7c45f973a119412a9ab/app/src/main/java/com/example/android/architecture/blueprints/todoapp/taskdetail/TaskDetailScreen.kt#L66-L68 Last snackbar message will be shown again. But this time, in my opinion, because there is copy of route with
USER_MESSAGE_ARG
in backstack.How this can be fixed or bypassed?