Skip to content

Commit

Permalink
Merge pull request #258 from Team-WSS/feat/257
Browse files Browse the repository at this point in the history
  • Loading branch information
junseo511 committed Aug 28, 2024
2 parents a7a12e2 + 911b019 commit 9c2bd81
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ class NovelDetailViewModel @Inject constructor(
fun updateIsFirstLaunched() {
viewModelScope.launch {
runCatching {
userPreferencesRepository.fetchNovelDetailFirstLaunched()
}.onSuccess { isFirstLaunched ->
userPreferencesRepository.saveNovelDetailFirstLaunched(false)
}.onSuccess {
_novelDetailModel.value =
novelDetailModel.value?.copy(isFirstLaunched = isFirstLaunched)
novelDetailModel.value?.copy(isFirstLaunched = false)
}.onFailure {
_novelDetailModel.value = novelDetailModel.value?.copy(isFirstLaunched = true)
}
Expand Down

0 comments on commit 9c2bd81

Please sign in to comment.