fix: Placement 재진입 시 상태 리셋 (Step 1부터 시작)
LaunchedEffect(Unit)으로 진입 시 모든 상태 초기화: phase→VERTICAL, isLocked→false, scanCount→0, channelDetected→false, urineLen→0 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+11
@@ -72,6 +72,17 @@ fun PlacementGuideView(appState: AppState) {
|
|||||||
// 2단계 순차 탐색: VERTICAL → LATERAL → GREEN
|
// 2단계 순차 탐색: VERTICAL → LATERAL → GREEN
|
||||||
var placementPhase by remember { mutableStateOf(PlacementPhase.VERTICAL) }
|
var placementPhase by remember { mutableStateOf(PlacementPhase.VERTICAL) }
|
||||||
|
|
||||||
|
// 화면 진입 시 상태 리셋
|
||||||
|
LaunchedEffect(Unit) {
|
||||||
|
placementPhase = PlacementPhase.VERTICAL
|
||||||
|
isLocked = false
|
||||||
|
scanCount = 0
|
||||||
|
placementScore = 0
|
||||||
|
directionHint = "센서를 아래에서 위로 천천히 이동하세요"
|
||||||
|
directionIcon = ""
|
||||||
|
for (i in 0 until 6) { channelDetected[i] = false; channelUrineLen[i] = 0 }
|
||||||
|
}
|
||||||
|
|
||||||
val detectedCount = channelDetected.count { it }
|
val detectedCount = channelDetected.count { it }
|
||||||
|
|
||||||
Column(
|
Column(
|
||||||
|
|||||||
Reference in New Issue
Block a user