mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-05-12 08:42:01 -04:00
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:
committed by
GitHub
parent
e2700b26aa
commit
6d7ddebbef
@@ -34,8 +34,4 @@ class MeshtasticCarAppService : CarAppService() {
|
||||
|
||||
override fun onCreateSession(sessionInfo: SessionInfo): Session =
|
||||
MeshtasticCarSession()
|
||||
|
||||
@Suppress("DEPRECATION", "OVERRIDE_DEPRECATION")
|
||||
override fun onCreateSession(): Session =
|
||||
MeshtasticCarSession()
|
||||
}
|
||||
|
||||
@@ -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 ->
|
||||
|
||||
Reference in New Issue
Block a user