diff --git a/app/src/main/java/com/example/medilightv2android/ui/components/FirmwareWarningBanner.kt b/app/src/main/java/com/example/medilightv2android/ui/components/FirmwareWarningBanner.kt index 2079111..d0911d4 100644 --- a/app/src/main/java/com/example/medilightv2android/ui/components/FirmwareWarningBanner.kt +++ b/app/src/main/java/com/example/medilightv2android/ui/components/FirmwareWarningBanner.kt @@ -61,11 +61,13 @@ fun FirmwareWarningBanner(bleManager: BleManager, modifier: Modifier = Modifier) if (!outdated && !timedOut) return val bgColor = if (outdated) Color(0xFFFF9500) else Color(0xFFD32F2F) - val title = if (outdated) "펌웨어 업데이트 필요" else "펌웨어 응답 없음" - val subtitle = if (outdated) { + val title = if (outdated) "펌웨어 업데이트 필요" else "기기 응답 없음" + // timedOut(mid? 미수신) 케이스는 사용자에게 mid?/펌웨어 호환 같은 기술 용어가 무의미. + // outdated 일 때만 상세 안내, timedOut 은 타이틀만 노출. + val subtitle: String? = if (outdated) { "현재: $fw · 필요: VBTFW${"%04d".format(BleManager.MIN_FIRMWARE_BUILD)} 이상. 측정이 정상 동작하지 않을 수 있습니다." } else { - "연결됐으나 mid? 응답 미수신. 펌웨어 호환 문제 가능 — 측정 안 될 수 있음." + null } Row( @@ -81,7 +83,9 @@ fun FirmwareWarningBanner(bleManager: BleManager, modifier: Modifier = Modifier) Spacer(modifier = Modifier.width(10.dp)) Column(modifier = Modifier.weight(1f)) { Text(title, fontSize = 13.sp, fontWeight = FontWeight.Bold, color = Color.White) - Text(subtitle, fontSize = 11.sp, color = Color.White.copy(alpha = 0.9f)) + if (subtitle != null) { + Text(subtitle, fontSize = 11.sp, color = Color.White.copy(alpha = 0.9f)) + } } } }