Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AN] Success로 캐스팅하는 코드 개선 (학교 선택 화면) #473

Closed
EmilyCh0 opened this issue Sep 27, 2023 · 0 comments · Fixed by #475
Closed

[AN] Success로 캐스팅하는 코드 개선 (학교 선택 화면) #473

EmilyCh0 opened this issue Sep 27, 2023 · 0 comments · Fixed by #475
Assignees
Labels
AN 안드로이드에 관련된 작업 USER ⚙️ 리팩터링 리팩터링에 관련된 작업

Comments

@EmilyCh0
Copy link
Member

✨ 세부 내용

다음과 같은 UiState 캐스팅 코드를 개선합니다. 다른 화면도 리팩 필요!

viewModelScope.launch {
    if (uiState.value is SelectSchoolUiState.Success) {
        val success = uiState.value as SelectSchoolUiState.Success
        success.selectedSchoolId?.let { schoolId ->
            _event.emit(
                SelectSchoolEvent.ShowStudentVerification(schoolId)
            )
        }
    }
}

⏰ 예상 소요 시간

30분

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AN 안드로이드에 관련된 작업 USER ⚙️ 리팩터링 리팩터링에 관련된 작업
Projects
Status: Done
1 participant