This repository was archived by the owner on Aug 21, 2025. It is now read-only.
Fix issues in the release build related to Navigation Component#107
Merged
AdamGrzybkowski merged 3 commits intotrunkfrom Aug 13, 2025
Merged
Fix issues in the release build related to Navigation Component#107AdamGrzybkowski merged 3 commits intotrunkfrom
AdamGrzybkowski merged 3 commits intotrunkfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes navigation and UI issues in the Android app's release build caused by code obfuscation. The main problem was using ::class.qualifiedName for route comparison, which fails in release builds where class names are obfuscated by R8.
- Replaces
::class.qualifiedNameroute comparison with Navigation library'shasRouteAPI - Fixes back navigation behavior after login/logout operations
- Resolves bottom navigation bar icon tinting issues
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| HomeScreen.kt | Updates bottom navigation selection logic to use hasRoute instead of string route comparison |
| HomeNavigation.kt | Removes the obfuscation-prone route property from HomeDestination |
| RootNavigation.kt | Refactors root navigation logic with hasRoute API and adds extension property for destination mapping |
app/src/main/java/com/gravatar/app/navigation/RootNavigation.kt
Outdated
Show resolved
Hide resolved
📲 You can test the changes from this Pull Request in Gravatar Android by scanning the QR code below to install the corresponding build.
|
etoledom
approved these changes
Aug 13, 2025
Contributor
etoledom
left a comment
There was a problem hiding this comment.
Working as expected 🎉
Tested using the Prototype build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Two things are broken in the release build:
The root cause is the usage of
::class.qualifiedNamewhen comparing the current navigation destination. With r8 in the release build, the code is obfuscated, and the name of the RootDestination or HomeDestination is different.This PR fixes this issue by using the API function from the Navigation library
hasRoute.Fixed issue number 1:
Screen_recording_20250812_112707.mp4
and the icon tinting:
Testing Steps
release. (Make sure you have the mobile secrets updated and applied to the project)