Closed arkivanov closed 4 months ago
This update introduces the keyHashString()
function to replace the existing hashString()
function, aiming to generate unique hash strings for component configurations and keys. This improvement addresses issues with duplicate hash codes caused by identical arguments in different components, thus enhancing the robustness of navigation between components.
Files | Change Summary |
---|---|
decompose/.../Utils.kt |
Added keyHashString() function, annotated with @InternalDecomposeApi . |
decompose/.../KeyHashStringTest.kt |
New test file with KeyHashStringTest class, including keyed_keyHashString_returns_distinct_values() method. |
extensions-android/.../StackRouterView.kt |
Updated import from hashString to keyHashString and corrected method parameter signature. |
extensions-compose/.../pages/Pages.kt , children/Children.kt |
Modified import and usage of hashString to keyHashString ; removed ExperimentalDecomposeApi in Children.kt . |
Objective | Addressed | Explanation |
---|---|---|
Ensure distinct hash strings are generated for similarly configured components (#733) | ✅ | |
Replace hashString with new keyHashString to solve duplicate hash code issues (#733) |
✅ |
In code's great dance, a hash refined, No duplicates, just peace we'll find. With
keyHashString
, new keys take flight, Components shine, distinct and bright. 🌟✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Fixes #733.
Summary by CodeRabbit
New Features
keyHashString
function to improve key hashing.Refactor
keyHashString
instead ofhashString
across various modules.Tests
keyHashString
.