android / android/architecture-samples
Snackbar shown again on popBackstack()
- Dominant language
- Kotlin
- Stars
- 45.8k
- Forks
- 11.9k
- PR merge metrics
- No merged PRs in 30d
Description
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?**
Contributor guide
Research direction
Start by reproducing the navigation sequence described in TasksScreen.kt, TodoNavGraph.kt, and TaskDetailScreen.kt: trigger the snackbar, revisit task details, and use the top-bar back arrow. Inspect the referenced code and back-stack behavior; done means the previous snackbar message is not shown again after popBackStack().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100