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:
M57 authored and GitHub committed 2026-06-20 23:44:39 +03:00
1 parent 81b2ff3aa5
commit 045932ca8b
6 files changed
+71 -13

No files matched your search

@@ -812,12 +812,11 @@ private fun RichText(
}
private val TIMESTAMP_FORMATTER =
DateTimeFormatter.ofPattern("HH:mm")
DateTimeFormatter
.ofPattern("HH:mm")
.withZone(ZoneId.systemDefault())
private fun formatTimestamp(timestamp: Long): String {
return TIMESTAMP_FORMATTER.format(Instant.ofEpochMilli(timestamp))
}
private fun formatTimestamp(timestamp: Long): String = TIMESTAMP_FORMATTER.format(Instant.ofEpochMilli(timestamp))
/**
* Build an AnnotatedString with search matches highlighted.