diff --git a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpViewModel.kt b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpViewModel.kt index bafb9840..35b015a5 100644 --- a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpViewModel.kt +++ b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpViewModel.kt @@ -8,6 +8,8 @@ import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.SharedFlow import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asSharedFlow +import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.launch import javax.inject.Inject @@ -17,19 +19,19 @@ class SignUpViewModel @Inject constructor( ) : ViewModel() { private val _signUpEventFlow = MutableSharedFlow() - val signUpEventFlow: SharedFlow get() = _signUpEventFlow + val signUpEventFlow: SharedFlow = _signUpEventFlow.asSharedFlow() private val _signUpName: MutableStateFlow = MutableStateFlow("") - val signUpName: StateFlow get() = _signUpName + val signUpName: StateFlow = _signUpName.asStateFlow() private val _signUpStudentId: MutableStateFlow = MutableStateFlow("") - val signUpStudentId: StateFlow get() = _signUpStudentId + val signUpStudentId: StateFlow = _signUpStudentId.asStateFlow() private val _signUpYear: MutableStateFlow = MutableStateFlow("") - val signUpYear: StateFlow get() = _signUpYear + val signUpYear: StateFlow = _signUpYear.asStateFlow() private val _signUpSemester: MutableStateFlow = MutableStateFlow(FIRST_SEMESTER) - val signUpSemester: StateFlow get() = _signUpSemester + val signUpSemester: StateFlow = _signUpSemester.asStateFlow() fun postUserProfile() = viewModelScope.launch { if (!isValidStudentId()) {