New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: don't replace fragment on another fragment if they are the same #3835
fix: don't replace fragment on another fragment if they are the same #3835
Conversation
I don't really like this implementation using tag string. Can't we compare using |
Can I ask you why? fragment manager doesn't have convenient mechanism to retrieve current fragment, by combining looks like we use
|
Just because it's a useless var if we can check the type as you showed IMHO. About your second solution, if you could test it and see if it works it would be awesome! |
@VaiTon hey check updated version please |
app/src/main/java/openfoodfacts/github/scrachx/openfood/features/MainActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/openfoodfacts/github/scrachx/openfood/features/MainActivity.kt
Outdated
Show resolved
Hide resolved
...ain/java/openfoodfacts/github/scrachx/openfood/features/searchbycode/SearchByCodeFragment.kt
Show resolved
Hide resolved
...c/main/java/openfoodfacts/github/scrachx/openfood/features/listeners/CommonBottomListener.kt
Outdated
Show resolved
Hide resolved
ptal @VaiTon |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Thanks! 🎉 |
Description
when user clicks on "Home" button twice we did a replacement of current fragment on new instance of this fragment and do extra calls to the server
Related issues
Fixes #3465