fix(auto): address code review — filterIndexed, remove deprecated override

Agent-Logs-Url: https://github.com/meshtastic/Meshtastic-Android/sessions/571f7a66-0c36-43f2-890e-c8ed87ec7164

Co-authored-by: garthvh <1795163+garthvh@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-17 03:17:21 +00:00
committed by GitHub
parent e2700b26aa
commit 6d7ddebbef
2 changed files with 5 additions and 5 deletions

View File

@@ -34,8 +34,4 @@ class MeshtasticCarAppService : CarAppService() {
override fun onCreateSession(sessionInfo: SessionInfo): Session =
MeshtasticCarSession()
@Suppress("DEPRECATION", "OVERRIDE_DEPRECATION")
override fun onCreateSession(): Session =
MeshtasticCarSession()
}

View File

@@ -75,7 +75,11 @@ class ConversationShortcutManager(
.distinctUntilChanged()
val channelsFlow = radioConfigRepository.channelSetFlow
.map { cs -> cs.settings.filter { it.name.isNotEmpty() || cs.settings.indexOf(it) == 0 } }
.map { cs ->
cs.settings.filterIndexed { index, settings ->
settings.name.isNotEmpty() || index == 0
}
}
.distinctUntilChanged()
combine(favoritesFlow, channelsFlow) { favorites, channels ->