mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-14 18:26:11 -04:00
Resolve live pod profiles from current repo state
This commit is contained in:
@@ -53,9 +53,11 @@ class DeviceMonitor @Inject constructor(
|
||||
deviceStateCache.cachedStates,
|
||||
profilesRepo.profiles,
|
||||
) { pods, aapStates, cachedStates, profiles ->
|
||||
val profilesById = profiles.associateBy { it.id }
|
||||
|
||||
// Live devices — BLE + AAP + cached fallback for missing fields
|
||||
val liveDevices = pods.map { pod ->
|
||||
val profile = pod.meta.profile
|
||||
val profile = pod.meta.profile?.id?.let(profilesById::get)
|
||||
PodDevice(
|
||||
profileId = profile?.id,
|
||||
label = profile?.label,
|
||||
|
||||
Reference in New Issue
Block a user