Skip to content

Commit 9fed1ba

Browse files
committed
refactor :: savedStateHandle 값 제거
1 parent e946c00 commit 9fed1ba

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

feature/post-review/src/main/java/team/retum/post_review/viewmodel/PostReviewViewModel.kt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ internal class PostReviewViewModel @Inject constructor(
3232
private val fetchMyReviewsUseCase: FetchMyReviewUseCase,
3333
private val fetchStudentInformationUseCase: FetchStudentInformationUseCase,
3434
private val postReviewUseCase: PostReviewUseCase,
35-
private val savedStateHandle: SavedStateHandle,
3635
) : BaseViewModel<PostReviewState, PostReviewSideEffect>(PostReviewState.getInitialState()) {
3736

3837
init {
@@ -41,15 +40,6 @@ internal class PostReviewViewModel @Inject constructor(
4140
var techs: SnapshotStateList<CodesEntity.CodeEntity> = mutableStateListOf()
4241
private set
4342

44-
val companyId: StateFlow<Long> = savedStateHandle.getStateFlow("companyId", 0L)
45-
val companyName: StateFlow<String> = savedStateHandle.getStateFlow("companyName", "")
46-
47-
internal fun setInit(companyId: Long, companyName: String) {
48-
savedStateHandle["companyId"] = companyId
49-
savedStateHandle["companyName"] = companyName
50-
setState { PostReviewState.getInitialState() }
51-
}
52-
5343
private fun fetchStudentInfo() {
5444
viewModelScope.launch(Dispatchers.IO) {
5545
fetchStudentInformationUseCase().onSuccess {

0 commit comments

Comments
 (0)