Fix camera screen: navigate via AppScreen instead of overlay

Camera was hidden behind PiezoMonitoringView because it was rendered
as a child composable. Now uses AppScreen.URINE_CAMERA for full
Crossfade navigation — camera gets its own screen transition.

Flow: Catheterize → 카메라 → AppScreen.URINE_CAMERA → measure → back to PIEZO_MONITORING

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-02 14:21:00 +09:00
parent 333df201f9
commit e142b55063
3 changed files with 16 additions and 10 deletions
@@ -14,7 +14,8 @@ enum class AppScreen {
ONBOARDING, REGISTRATION, HOME, SENSOR_SELECT, DEVICE_SCAN, ONBOARDING, REGISTRATION, HOME, SENSOR_SELECT, DEVICE_SCAN,
NIRS_CALIBRATION, PIEZO_PERSONALIZATION, PIN_SETUP, PIN_ENTRY, NIRS_CALIBRATION, PIEZO_PERSONALIZATION, PIN_SETUP, PIN_ENTRY,
VIVAMYO_MONITORING, PIEZO_MONITORING, MEASUREMENT_HISTORY, VIVAMYO_MONITORING, PIEZO_MONITORING, MEASUREMENT_HISTORY,
VOIDING_DIARY VOIDING_DIARY,
URINE_CAMERA
} }
class AppState(private val context: Context) { class AppState(private val context: Context) {
@@ -23,6 +23,7 @@ import com.example.medilightv2android.ui.views.history.MeasurementHistoryView
import com.example.medilightv2android.ui.views.home.HomeView import com.example.medilightv2android.ui.views.home.HomeView
import com.example.medilightv2android.ui.views.monitoring.PiezoMonitoringView import com.example.medilightv2android.ui.views.monitoring.PiezoMonitoringView
import com.example.medilightv2android.ui.views.monitoring.VivamyoMonitoringView import com.example.medilightv2android.ui.views.monitoring.VivamyoMonitoringView
import com.example.medilightv2android.ui.views.monitoring.UrineCameraScreen
import com.example.medilightv2android.ui.views.monitoring.VoidingDiaryView import com.example.medilightv2android.ui.views.monitoring.VoidingDiaryView
import com.example.medilightv2android.ui.views.onboarding.OnboardingView import com.example.medilightv2android.ui.views.onboarding.OnboardingView
import com.example.medilightv2android.ui.views.personalization.PiezoPersonalizationView import com.example.medilightv2android.ui.views.personalization.PiezoPersonalizationView
@@ -76,6 +77,13 @@ fun MedilightApp(modifier: Modifier = Modifier) {
AppScreen.PIEZO_MONITORING -> PiezoMonitoringView(appState) AppScreen.PIEZO_MONITORING -> PiezoMonitoringView(appState)
AppScreen.MEASUREMENT_HISTORY -> MeasurementHistoryView(appState) AppScreen.MEASUREMENT_HISTORY -> MeasurementHistoryView(appState)
AppScreen.VOIDING_DIARY -> VoidingDiaryView(onBack = { appState.currentScreen = AppScreen.HOME }) AppScreen.VOIDING_DIARY -> VoidingDiaryView(onBack = { appState.currentScreen = AppScreen.HOME })
AppScreen.URINE_CAMERA -> UrineCameraScreen(
onDone = { volume ->
if (volume != null && volume > 0) appState.resetLevel()
appState.currentScreen = AppScreen.PIEZO_MONITORING
},
onCancel = { appState.currentScreen = AppScreen.PIEZO_MONITORING }
)
} }
} }
} }
@@ -250,15 +250,12 @@ fun PiezoMonitoringView(appState: AppState) {
) )
} }
// 소변컵 카메라 촬영 화면 (풀스크린 오버레이) // 카메라 → AppScreen으로 전환
if (showUrineCamera) { LaunchedEffect(showUrineCamera) {
UrineCameraScreen( if (showUrineCamera) {
onDone = { volume -> showUrineCamera = false
showUrineCamera = false appState.currentScreen = AppScreen.URINE_CAMERA
if (volume != null && volume > 0) appState.resetLevel() }
},
onCancel = { showUrineCamera = false }
)
} }
Column( Column(