Skip to content

Commit

Permalink
[mod] #92 value 대신 emit 함수 사용하도록
Browse files Browse the repository at this point in the history
  • Loading branch information
leeeha committed Aug 8, 2023
1 parent 75ccd24 commit 1148523
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@ class AmountViewModel @Inject constructor(
val (file, requestMap) = createRequestBody(content, amount)
authRepository.postWineyFeed(file, requestMap)
.onSuccess { response ->
_postWineyFeedState.value = UiState.Success(response)
_postWineyFeedState.emit(UiState.Success(response))
Timber.d("${response?.feedId} ${response?.createdAt}")
}
.onFailure { t ->
if (t is HttpException) {
_postWineyFeedState.value = UiState.Failure(t.message())
_postWineyFeedState.emit(UiState.Failure(t.message()))
Timber.e("${t.code()} ${t.message()}")
return@onFailure
}
_postWineyFeedState.value = UiState.Failure(t.message.toString())
_postWineyFeedState.emit(UiState.Failure(t.message.toString()))
Timber.e(t.message)
}
}
Expand Down

0 comments on commit 1148523

Please sign in to comment.