Optimize collection creation in Navigation.kt (#180)
* ⚡ Optimize collection creation in Navigation.kt Replaced uses of `.map { ... }.toSet()` with `.mapTo(mutableSetOf()) { ... }` in Navigation.kt. This avoids the creation of intermediate ArrayList objects, saving unnecessary memory allocations. * ⚡ Optimize collection creation in Navigation.kt Replaced uses of `.map { ... }.toSet()` with `.mapTo(mutableSetOf()) { ... }` in Navigation.kt. This avoids the creation of intermediate ArrayList objects, saving unnecessary memory allocations. Fixed ktlint formatting issues causing CI failure.
This commit is contained in:
6 files changed
+71
-13
No files matched your search
@@ -177,7 +177,7 @@ private val DRAWER_ENTRIES =
|
||||
DrawerEntry(AchievementsScreen, "Achievements", Icons.Filled.Info, DrawerSection.INSPECT),
|
||||
)
|
||||
|
||||
private val DRAWER_GESTURE_SCREENS: Set<NavKey> = ALL_NAV_ITEMS.map { it.key }.toSet()
|
||||
private val DRAWER_GESTURE_SCREENS: Set<NavKey> = ALL_NAV_ITEMS.mapTo(mutableSetOf()) { it.key }
|
||||
|
||||
@Composable
|
||||
fun MainNavigation(sessionId: String? = null) {
|
||||
|
||||
Reference in new issue
Block a user