From 11d97a2d5ffa90100476f6ed58350804a9158d2e Mon Sep 17 00:00:00 2001 From: M57 <41645758+Hy4ri@users.noreply.github.com> Date: Fri, 19 Jun 2026 20:48:48 +0300 Subject: [PATCH] fix(#75): replace non-null assertion on simpleName with safe mapNotNull * ci: prevent concurrency cancellation on rapid main merges The concurrency group used github.ref which is static for main (refs/heads/main). When multiple PRs merged rapidly (~2 min apart), each merge commit cancelled the previous CI run before it could finish. Fix: use github.sha for push events to main (unique per commit) while keeping the ref-based group for PR branches (cancels on new commits to the same PR branch). * refactor(#82): remove dead SkeletonList/SkeletonCard composables * fix(#72): echo server's WebSocket close code instead of hardcoded 1000 * fix(#75): replace non-null assertion on simpleName with safe mapNotNull --------- Co-authored-by: ronia Co-authored-by: M57 --- app/src/main/java/com/m57/hermescontrol/Navigation.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/m57/hermescontrol/Navigation.kt b/app/src/main/java/com/m57/hermescontrol/Navigation.kt index 62524045..c1e1f16f 100644 --- a/app/src/main/java/com/m57/hermescontrol/Navigation.kt +++ b/app/src/main/java/com/m57/hermescontrol/Navigation.kt @@ -121,7 +121,7 @@ private val ALL_NAV_ITEMS: List = /** Lookup: data-object simple name → NavKey (used by bottom-nav config). */ private val NAV_KEY_BY_NAME: Map = - ALL_NAV_ITEMS.associate { it.key::class.simpleName!! to it.key } + ALL_NAV_ITEMS.mapNotNull { it.key::class.simpleName?.let { name -> name to it.key } }.toMap() /** Resolve a persisted list of nav-item names to BottomNavItem instances. */ private fun resolveBottomNavItems(names: List): List =