refactor: add DTO mapper for DeviceHardware

This commit is contained in:
andrekir 2024-12-10 12:19:33 -03:00
parent 165f5a2b49
commit 1a67ea8ad4
3 changed files with 72 additions and 52 deletions

View file

@ -217,7 +217,6 @@ private fun DeviceDetailsContent(
) {
val node = state.node ?: return
val deviceHardware = state.deviceHardware ?: return
val deviceImageRes = state.deviceImageRes
val hwModelName = deviceHardware.displayName
val isSupported = deviceHardware.activelySupported
Box(
@ -233,7 +232,7 @@ private fun DeviceDetailsContent(
) {
Image(
modifier = Modifier.padding(16.dp),
imageVector = ImageVector.vectorResource(deviceImageRes),
imageVector = ImageVector.vectorResource(deviceHardware.image),
contentDescription = hwModelName,
)
}